abo-abo / avy

Jump to things in Emacs tree-style
1.71k stars 109 forks source link

evil isearch-forward not jumping to position specified by avy-isearch #321

Open alikthename opened 3 years ago

alikthename commented 3 years ago

This is probably not even intended functionality, but... Evil package has 2 search modes. One of them is native emacs isearch, but of course it's wrapped by evil-search-* functions. Now when using evil-search-backward avy-isearch works the same way as with bare isearch, beautiful. But with evil-search-forward all is good until last epic moment when jump character is pressed, cursor just stays where it was. Would be beautiful if it worked because evil isearch has everything isearch has plus puts marks to evil's jumplist

unhammer commented 1 year ago

Seems to be https://github.com/emacs-evil/evil/blob/master/evil-search.el#L97-L113 which moves to isearch-other-end if point moved. A possible fix is to

diff --git a/avy-20191106.1234/avy.el b/avy-20191106.1234/avy.el
index 606f6fa..9513685 100644
--- a/avy-20191106.1234/avy.el
+++ b/avy-20191106.1234/avy.el
@@ -1357,6 +1357,7 @@ When ARG is non-nil, do the opposite of `avy-all-windows'."
            (avy--regex-candidates (if isearch-regexp
                                       isearch-string
                                     (regexp-quote isearch-string))))
+        (setq isearch-other-end (point))
         (isearch-done)))))

 ;;;###autoload

which … kind of makes sense