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

hitting enter during search doesn't keep the search focus center #86

Open
rileyrg opened this issue Mar 9, 2021 · 3 comments
Open

hitting enter during search doesn't keep the search focus center #86

rileyrg opened this issue Mar 9, 2021 · 3 comments

Comments

@rileyrg
Copy link

rileyrg commented Mar 9, 2021

I have the auto-center option on so when I hit C-s the next search match is in the centre of the screen. It would be VERY nice (and consistent) if when I hit enter to exit search and cursor around the text I just located it stayed in the centre,. As it is, the buffer jumps - very inconvenient when trying to do a screencast.

@raxod502
Copy link
Member

Yes, I agree: the desired behavior you describe is what should happen. It sounds like there is a bug that prevents this from being the case currently. The scroll position should remain unchanged when you exit a search, unless you've aborted it (in which case it should scroll back to your initial starting position). If you disable ctrlf-auto-recenter, does the scroll position remain fixed when you exit a search? In other words, does this bug occur only with ctrlf-auto-recenter enabled?

@rileyrg
Copy link
Author

rileyrg commented Apr 2, 2021

Sorry for the late reply. It happens with or without auto-recenter. I'm not aware of any hack I have which could cause this.

@jdtsmith
Copy link

Just posted the same issue in #90; looks like a mechanism was already in place to "fix" this misbehavior on mini-buffer exit (by restoring window-start), but never actually used. Putting it in place ctrlf--finalize fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants