doom*evil-esc-quit: ESC is special in popups
This commit is contained in:
parent
93b5cecd9d
commit
2c55f53cbd
1 changed files with 9 additions and 7 deletions
|
@ -192,13 +192,15 @@ monkey patch it to use pop-to-buffer."
|
|||
;;;###autoload
|
||||
(defun doom*evil-esc-quit ()
|
||||
"Close popups, disable search highlights and quit the minibuffer if open."
|
||||
(let ((minib-p (minibuffer-window-active-p (minibuffer-window)))
|
||||
(evil-hl-p (evil-ex-hl-active-p 'evil-ex-search)))
|
||||
(when minib-p (abort-recursive-edit))
|
||||
(when evil-hl-p (evil-ex-nohighlight))
|
||||
;; Close non-repl popups and clean up `doom-popup-windows'
|
||||
(unless (or minib-p evil-hl-p (bound-and-true-p doom-popup-mode))
|
||||
(doom/popup-close-all))))
|
||||
(if (and (doom/popup-p) (memq :noesc doom-popup-rule))
|
||||
(doom/popup-close)
|
||||
(let ((minib-p (minibuffer-window-active-p (minibuffer-window)))
|
||||
(evil-hl-p (evil-ex-hl-active-p 'evil-ex-search)))
|
||||
(when minib-p (abort-recursive-edit))
|
||||
(when evil-hl-p (evil-ex-nohighlight))
|
||||
;; Close non-repl popups and clean up `doom-popup-windows'
|
||||
(unless (or minib-p evil-hl-p)
|
||||
(doom/popup-close-all)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom*evil-ex-replace-special-filenames (file-name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue