diff --git a/CHANGELOG.md b/CHANGELOG.md index 7421c28..17234c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog]. +## [Unreleased] +### Bugs fixed +* Point at start of search wasn't being added to the mark ring when + `ctrlf-auto-recenter` was enabled ([#133]). + ## 1.6 (released 2022-11-11) ### Enhancements * Improved evil-mode's search history integration so it will now use diff --git a/ctrlf.el b/ctrlf.el index eb22d77..44081d4 100644 --- a/ctrlf.el +++ b/ctrlf.el @@ -981,9 +981,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) - (if ctrlf-auto-recenter - (set-window-start (get-buffer-window) ctrlf--final-window-start) - (push-mark ctrlf--starting-point)))) + (when 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."