From de96ed6c3fb51b49a33a5cc4dacd74763f90d1b8 Mon Sep 17 00:00:00 2001 From: SeungKi Kim Date: Mon, 14 Dec 2020 01:03:16 +0900 Subject: Fix to properly exit the action list #103 1. Fix that pressing `ESC` is showing "^[ is not bound" issue. 2. Fix that pressing `C-g` is showing "^[ is not bound" issue. 3. Add support `M-o` to properly exit the action list --- ivy-posframe.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ivy-posframe.el b/ivy-posframe.el index 555fc6e..f9e59b6 100644 --- a/ivy-posframe.el +++ b/ivy-posframe.el @@ -361,15 +361,16 @@ This variable is useful for `ivy-posframe-read-action' .") (string-prefix-p key (car x))) (cdr actions))) (not (string= key (car (nth action-idx (cdr actions)))))) - (setq key (concat key (string - (read-key - (if (functionp display-function) - (let ((ivy-posframe--ignore-prompt t)) - (funcall display-function hint) - "Please type a key: ") - hint)))))) + (setq key (concat key (key-description + (vector + (read-key + (if (functionp display-function) + (let ((ivy-posframe--ignore-prompt t)) + (funcall display-function hint) + "Please type a key: ") + hint))))))) (ivy-shrink-after-dispatching) - (cond ((member key '("ESC" "C-g")) + (cond ((member key '("ESC" "C-g" "M-o")) nil) ((null action-idx) (message "%s is not bound" key) -- cgit v1.0