mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 05:23:05 +00:00
Add window selection via mouse button press and fix typo
This commit is contained in:
parent
793a5e22a7
commit
9489ca9064
18
avy.el
18
avy.el
@ -465,15 +465,19 @@ multiple DISPLAY-FN invocations."
|
|||||||
(dolist (x avy--leafs)
|
(dolist (x avy--leafs)
|
||||||
(funcall display-fn (car x) (cdr x))))
|
(funcall display-fn (car x) (cdr x))))
|
||||||
(let ((char (funcall avy-translate-char-function (read-key)))
|
(let ((char (funcall avy-translate-char-function (read-key)))
|
||||||
|
window
|
||||||
branch)
|
branch)
|
||||||
(funcall cleanup-fn)
|
(funcall cleanup-fn)
|
||||||
(if (setq branch (assoc char tree))
|
(if (setq window (avy-mouse-event-window char))
|
||||||
(progn
|
(throw 'done (cons char window))
|
||||||
(setq avy-current-path
|
;; Ensure avy-current-path stores the full path given before
|
||||||
(concat avy-current-path (string (avy--key-to-char char))))
|
;; exit for testing when an invalid path character is given.
|
||||||
(when (eq (car (setq tree (cdr branch))) 'leaf)
|
(setq avy-current-path
|
||||||
(throw 'done (cdr tree))))
|
(concat avy-current-path (string (avy--key-to-char char))))
|
||||||
(funcall avy-handler-function char))))))
|
(if (setq branch (assoc char tree))
|
||||||
|
(if (eq (car (setq tree (cdr branch))) 'leaf)
|
||||||
|
(throw 'done (cdr tree)))
|
||||||
|
(funcall avy-handler-function char)))))))
|
||||||
|
|
||||||
(defun avy-read-de-bruijn (lst keys)
|
(defun avy-read-de-bruijn (lst keys)
|
||||||
"Select from LST dispatching on KEYS."
|
"Select from LST dispatching on KEYS."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user