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

auto-recenter causes jump upon invoking C-s #93

Closed
jdtsmith opened this issue Apr 10, 2021 · 1 comment
Closed

auto-recenter causes jump upon invoking C-s #93

jdtsmith opened this issue Apr 10, 2021 · 1 comment

Comments

@jdtsmith
Copy link

With auto-recenter enabled, the point is centered in the window immediately upon invoking ctrlf, even before search commences. This isn't ideal since you may change your mind and cancel the search. A simple fix:

diff -u ctrlf.el #<buffer ctrlf.el>
--- ctrlf.el
+++ #<buffer ctrlf.el>
@@ -748,7 +748,7 @@
               (goto-char prev-point)
               (setq ctrlf--match-bounds nil)))
           (set-window-point (minibuffer-selected-window) (point))
-          (when ctrlf-auto-recenter
+          (when (and ctrlf-auto-recenter ctrlf--match-bounds)
             (with-selected-window
                 (minibuffer-selected-window)
               (recenter)))
@raxod502
Copy link
Member

Thanks for the suggestion!

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

2 participants