Closed fhchl closed 2 months ago
this has nothing to do with insert-mode. Searching preserves selection direction. Section direction is a general property of of selections work in helix and not specifically related to insertmode (for example if entering insert-mode with a
the selection direction is forward). We are considering some changes to the search commands that may change this in the future. Currently the behaviour matches kakoune and is definitely intentional.
Summary
When searching in the current buffer, the position of the cursor after
search_next
seems to depend on whether or not one was in insert mode just before:search_next
puts the cursor at the last character of the next matchseach_next
puts the cursor at the beginning of the next matchThis is confusing. Let's say one does a search and wants to apply a macro for some of the matches. Then the macro might behave differently depending on history!
Is this desired behavior?
Reproduction Steps
See the recording here: https://asciinema.org/a/Gt68H1eCt2sX110fsHETQC2rS
Helix log
No response
Platform
Linux
Terminal Emulator
kitty 0.35.2
Installation Method
source and binary from release page
Helix Version
24.07-155-g6309cc71