ctrlf
ctrlf copied to clipboard
hitting enter during search doesn't keep the search focus center
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.
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?
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.
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.