VimBindings.jl
VimBindings.jl copied to clipboard
reverse history search with `k` ignores last character
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
.
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.