autolist.nvim icon indicating copy to clipboard operation
autolist.nvim copied to clipboard

fix: fall back to original indentation keypress functionality

Open mcauley-penney opened this issue 1 year ago • 2 comments

Problem: the press() function is used to fall back to the original functionality of <tab> and <S-tab> when not in a list context. When it does this, it appends before executing the original keypress, modifying the fall back functionality.

Solution: Do not append before using the fall back functionality of <tab> and <S-tab>.

This commit also refactors handle_indent(), - removes unused variables - removes run_recalculate_after_delay(), which appears to have no effect - reuses variables when possible (cur_line) - renames variables for brevity (in_list and at_line_end)

Fixes #79

mcauley-penney avatar Dec 30 '23 16:12 mcauley-penney

@gaoDean I'd like a test run of this PR to see how it works for you

mcauley-penney avatar Dec 30 '23 17:12 mcauley-penney

Just installed this modified version. I'll (hopefully) post feedback here.

pipoprods avatar Apr 04 '24 09:04 pipoprods