branch: master commit 98b70a7f868b25a5f8df20c3f3f321e678c19e3c Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper.el (swiper--update-input-ivy): Don't recenter when non-graphical Calling `recenter' results in an annoying blink. Fixes #1921 --- swiper.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swiper.el b/swiper.el index 0fe6779..ad66f20 100644 --- a/swiper.el +++ b/swiper.el @@ -675,8 +675,10 @@ Matched candidates should have `swiper-invocation-face'." (setq swiper--current-match-start (match-beginning 0)))) (isearch-range-invisible (line-beginning-position) (line-end-position)) - (unless (and (>= (point) (window-start)) - (<= (point) (window-end (ivy-state-window ivy-last) t))) + (unless (or (null window-system) + (and + (>= (point) (window-start)) + (<= (point) (window-end (ivy-state-window ivy-last) t)))) (recenter)) (setq swiper--current-window-start (window-start)))) (swiper--add-overlays