Skip to content

Commit

Permalink
Keep centered on return with ctrlf-auto-recenter. radian-software#90, r…
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasBHubbard committed Apr 23, 2022
1 parent 56021fd commit 24ed8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ctrlf.el
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,9 @@ I have literally no idea why this is needed.")
And self-destruct this hook."
(remove-hook 'post-command-hook #'ctrlf--finalize)
(unless (= (point) ctrlf--starting-point)
(push-mark ctrlf--starting-point)))
(if ctrlf-auto-recenter
(set-window-start (get-buffer-window) ctrlf--final-window-start)
(push-mark ctrlf--starting-point))))

(defun ctrlf--minibuffer-exit-hook ()
"Clean up CTRLF from minibuffer and self-destruct this hook."
Expand Down

0 comments on commit 24ed8d6

Please sign in to comment.