avy.el (avy-goto-char-2): Allow backspace

Fixes #249
This commit is contained in:
Oleh Krehel 2020-05-19 08:59:08 +02:00
parent acf553cae2
commit 36a48baa2c

14
avy.el
View File

@ -1308,8 +1308,18 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
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."
(interactive (list (read-char "char 1: " t)
(read-char "char 2: " t)
(interactive (list (let ((c1 (read-char "char 1: " t)))
(if (memq c1 '(? ?\b))
(keyboard-quit)
c1))
(let ((c2 (read-char "char 2: " t)))
(cond ((eq c2 ?)
(keyboard-quit))
((memq c2 avy-del-last-char-by)
(keyboard-escape-quit)
(call-interactively 'avy-goto-char-2))
(t
c2)))
current-prefix-arg
nil nil))
(when (eq char1 ? )