branch: master commit c7ffd06ea27f651587cb892da40f32b03d5b6eac Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper.el (swiper-isearch-action): Make ivy-previous-line-or-history work Fixes #2158 --- swiper.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/swiper.el b/swiper.el index 0f6aa39..36715af 100644 --- a/swiper.el +++ b/swiper.el @@ -1398,6 +1398,11 @@ that we search only for one character." (setq x (get-text-property 0 'point x)))) (with-ivy-window (goto-char x) + (when (and (or (eq this-command 'ivy-previous-line-or-history) + (and (eq this-command 'ivy-done) + (eq last-command 'ivy-previous-line-or-history))) + (looking-back ivy--old-re (line-beginning-position))) + (goto-char (match-beginning 0))) (isearch-range-invisible (point) (1+ (point))) (when swiper-action-recenter (recenter))