branch: master commit f1b3fa474a63226b64274beb8677a1dd5491e7a1 Author: Andrew Whatson <what...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper.el (swiper-isearch): Support swiper-goto-start-of-match Fixes #2029 --- swiper.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/swiper.el b/swiper.el index 2df423a..ef45500 100644 --- a/swiper.el +++ b/swiper.el @@ -1228,8 +1228,11 @@ come back to the same place as when \"a\" was initially entered.") (cl-incf idx) (let ((line (buffer-substring (line-beginning-position) - (line-end-position)))) - (put-text-property 0 1 'point (point) line) + (line-end-position))) + (pos (if swiper-goto-start-of-match + (match-beginning 0) + (point)))) + (put-text-property 0 1 'point pos line) (push line cands))))) (setq ivy--old-re re) (when idx-found