autolist.nvim
autolist.nvim copied to clipboard
fix: fall back to original indentation keypress functionality
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
@gaoDean I'd like a test run of this PR to see how it works for you
Just installed this modified version. I'll (hopefully) post feedback here.