branch: externals/avy
commit f91ae613a86187c8ca75e86f22e3f5ac9958399c
Author: Arte Ebrahimi <arteebrah...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    avy.el (avy-goto-line): Call avy-action-goto only when avy-action is not set
    
    Fixes #274
---
 avy.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/avy.el b/avy.el
index 0055fcb88f..a0dbd35288 100644
--- a/avy.el
+++ b/avy.el
@@ -1656,8 +1656,8 @@ The window scope is determined by `avy-all-windows'.
 When ARG is non-nil, do the opposite of `avy-all-windows'.
 BEG and END narrow the scope where candidates are searched.
 When BOTTOM-UP is non-nil, display avy candidates from top to bottom"
-  (let ((avy-action #'identity)
-        (avy-style (if avy-linum-mode
+  (setq avy-action (or avy-action #'identity))
+  (let ((avy-style (if avy-linum-mode
                        (progn
                          (message "Goto line:")
                          'ignore)
@@ -1699,7 +1699,7 @@ Otherwise, forward to `goto-line' with ARG."
                         (forward-line (1- (string-to-number line))))
                       (throw 'done 'exit))))))
              (r (avy--line (eq arg 4))))
-        (unless (eq r t)
+        (when (and (not (eq r t)) (eq avy-action #'identity))
           (avy-action-goto r))))))
 
 ;;;###autoload

Reply via email to