fix(jump): ensure one non-jump movement is enough to stop jumping#2335
fix(jump): ensure one non-jump movement is enough to stop jumping#2335abeldekat wants to merge 2 commits intonvim-mini:mainfrom
Conversation
Details: - Highlight matches even when the Operator-pending jump did not succeed. This can happen if the jump is not possible, but there are matches in the other direction. - The internal `undo` workaround is not needed anymore. Resolve nvim-mini#2323
Details: - When the state is jumping, but there was no jump, two non-jump movements are needed to stop jumping. This can happen when the jump is not possible and there are targets in the other direction.
|
Thanks for the PR! The change looks reasonable. I've applied the relevant commit manually and tweaked a test case a bit (see 90c402e). What I've come to realize (some time after writing all 'mini.jump' tests) is that validating conditions inside a Another approach would be to have parametrized tests, of course, but it will inflate the number of test cases without much profit. It should be preferred if resetting to a clean state is either very hard or impossible. |
|
Great, thank you! |
Details:
movements are needed to stop jumping.
This can happen when the jump is not possible and there are targets
in the other direction.
Scenario with file containing a single word:
With cursor on a:
Cause: State is in jumping mode, but there was no jump, and thus no CursorMoved
This PR builds upon the commit proposed in #2332: fix(jump): do not force charwise Operator-pending jump#2332