branch: master commit 3101efd52713932e51b658111a456fcedd436267 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper.el (swiper--action): push-mark only if exited the minibuffer "C-M-n" and "C-M-p" will no longer push mark and annoy with messages. --- swiper.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/swiper.el b/swiper.el index e1f3d91..a33f0f3 100644 --- a/swiper.el +++ b/swiper.el @@ -513,8 +513,9 @@ WND, when specified is the window." (swiper--ensure-visible) (when (/= (point) swiper--opoint) (unless (and transient-mark-mode mark-active) - (push-mark swiper--opoint t) - (message "Mark saved where search started")))))) + (when (eq ivy-exit 'done) + (push-mark swiper--opoint t) + (message "Mark saved where search started"))))))) ;; (define-key isearch-mode-map (kbd "C-o") 'swiper-from-isearch) (defun swiper-from-isearch ()