VimBindings.jl icon indicating copy to clipboard operation
VimBindings.jl copied to clipboard

reverse history search with `k` ignores last character

Open bjarthur opened this issue 1 year ago • 1 comments

julia> aa=1
1

julia> ab=2
2

then typing aa escape k takes you to the ab=2 line, not the aa=1 line. if rather you type aa= then escape k ab=2 is skipped and you're taken to aa=1.

bjarthur avatar Jan 25 '24 17:01 bjarthur

I was hoping to solve this one in #97, but wasn't able to.

For my own future reference, I believe the issue here is that the reverse history search includes content before the cursor, and we unintentionally exclude the last character because when moving into Normal mode the cursor is moved back by one.

One possible hacky solution may be to move the cursor forward by one character immediately prior to the reverse history search, and then immediately return the cursor to its original position; the question is whether this would cause any kind of flashing artifacts.

caleb-allen avatar Apr 03 '24 17:04 caleb-allen