branch: externals/avy
commit 66886e265cf41c6061dc70440eb5b61fad8f48e0
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy-read): Don't call `avy--key-to-char' too early
If the key is intended for dispatch, it's not necessary for
`avy--key-to-char' to encode it as a char.
---
avy.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/avy.el b/avy.el
index 92fbc7859c..527479fdb5 100644
--- a/avy.el
+++ b/avy.el
@@ -518,13 +518,14 @@ multiple DISPLAY-FN invocations."
(funcall cleanup-fn)
(if (setq window (avy-mouse-event-window char))
(throw 'done (cons char window))
- ;; Ensure avy-current-path stores the full path prior to
- ;; exit so other packages can utilize its value.
- (setq avy-current-path
- (concat avy-current-path (string (avy--key-to-char char))))
(if (setq branch (assoc char tree))
- (if (eq (car (setq tree (cdr branch))) 'leaf)
- (throw 'done (cdr tree)))
+ (progn
+ ;; Ensure avy-current-path stores the full path prior to
+ ;; exit so other packages can utilize its value.
+ (setq avy-current-path
+ (concat avy-current-path (string (avy--key-to-char
char))))
+ (if (eq (car (setq tree (cdr branch))) 'leaf)
+ (throw 'done (cdr tree))))
(funcall avy-handler-function char)))))))
(defun avy-read-de-bruijn (lst keys)