Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse history search with k ignores last character #93

Open
bjarthur opened this issue Jan 25, 2024 · 1 comment
Open

reverse history search with k ignores last character #93

bjarthur opened this issue Jan 25, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@bjarthur
Copy link

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.

@caleb-allen
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants