branch: master commit b1ac6492bb75b1766064ac684cf9cf4a5a3cc626 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Don't recenter unless necessary * swiper.el (swiper--update-input-ivy): Update. --- swiper.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/swiper.el b/swiper.el index 4c22eba..b39235c 100644 --- a/swiper.el +++ b/swiper.el @@ -241,7 +241,9 @@ When non-nil, INITIAL-INPUT is the initial search pattern." (when (plusp num) (goto-char (point-min)) (forward-line (1- num)) - (recenter)) + (unless (and (> (point) (window-start)) + (< (point) (window-end swiper--window t))) + (recenter))) (let ((ov (make-overlay (line-beginning-position) (1+ (line-end-position)))))