avy.el (avy--read-candidates): Quit on ESC

Fixes #249
This commit is contained in:
Oleh Krehel 2018-09-13 20:19:19 +02:00
parent a29558d22c
commit cd8fb10759

3
avy.el
View File

@ -1917,6 +1917,9 @@ Otherwise, the whole regex is highlighted."
(let ((l (length str)))
(when (>= l 1)
(setq str (substring str 0 (1- l))))))
;; Handle ESC
((= char 27)
(keyboard-quit))
(t
(setq str (concat str (list char)))))
;; Highlight