mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +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)
|
||||
(funcall display-fn (car x) (cdr x))))
|
||||
(let ((char (funcall avy-translate-char-function (read-key)))
|
||||
window
|
||||
branch)
|
||||
(funcall cleanup-fn)
|
||||
(if (setq branch (assoc char tree))
|
||||
(progn
|
||||
(setq avy-current-path
|
||||
(concat avy-current-path (string (avy--key-to-char char))))
|
||||
(when (eq (car (setq tree (cdr branch))) 'leaf)
|
||||
(throw 'done (cdr tree))))
|
||||
(funcall avy-handler-function char))))))
|
||||
(if (setq window (avy-mouse-event-window char))
|
||||
(throw 'done (cons char window))
|
||||
;; Ensure avy-current-path stores the full path given before
|
||||
;; exit for testing when an invalid path character is given.
|
||||
(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)))
|
||||
(funcall avy-handler-function char)))))))
|
||||
|
||||
(defun avy-read-de-bruijn (lst keys)
|
||||
"Select from LST dispatching on KEYS."
|
||||
|
Loading…
x
Reference in New Issue
Block a user