mirror of https://github.com/djcb/mu.git
mu4e-util: allow ESC to exit a choice selection
I occasionally find myself pressing escape to exit a menu choice in mu4e and it's a bit unfortunate that nothing happens. As best I could tell, since this is a C call, none of the keymaps are checked for `(keyboard-quit)' so we need to explicitly check for ESC here This was previously fixed in02b5bc805c
but was inadvertently removed in0354fa4fac
, so more detail was added to the comment.
This commit is contained in:
parent
0bdab5ae06
commit
91464002b8
|
@ -262,6 +262,10 @@ Return the matching choice value (cdr of the cell)."
|
||||||
(while (not chosen)
|
(while (not chosen)
|
||||||
(message nil) ;; this seems needed...
|
(message nil) ;; this seems needed...
|
||||||
(when-let ((kar (read-char-exclusive prompt)))
|
(when-let ((kar (read-char-exclusive prompt)))
|
||||||
|
(when (eq kar ?\e) (keyboard-quit)) ;; `read-char-exclusive' is a C
|
||||||
|
;; function and doesn't check for
|
||||||
|
;; `keyboard-quit', there we need to
|
||||||
|
;; check if ESC is pressed
|
||||||
(setq chosen (mu4e--matching-choice choices kar))))
|
(setq chosen (mu4e--matching-choice choices kar))))
|
||||||
chosen))
|
chosen))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue