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
|
;;;###autoload
|
||||||
(defun doom*evil-esc-quit ()
|
(defun doom*evil-esc-quit ()
|
||||||
"Close popups, disable search highlights and quit the minibuffer if open."
|
"Close popups, disable search highlights and quit the minibuffer if open."
|
||||||
(let ((minib-p (minibuffer-window-active-p (minibuffer-window)))
|
(if (and (doom/popup-p) (memq :noesc doom-popup-rule))
|
||||||
(evil-hl-p (evil-ex-hl-active-p 'evil-ex-search)))
|
(doom/popup-close)
|
||||||
(when minib-p (abort-recursive-edit))
|
(let ((minib-p (minibuffer-window-active-p (minibuffer-window)))
|
||||||
(when evil-hl-p (evil-ex-nohighlight))
|
(evil-hl-p (evil-ex-hl-active-p 'evil-ex-search)))
|
||||||
;; Close non-repl popups and clean up `doom-popup-windows'
|
(when minib-p (abort-recursive-edit))
|
||||||
(unless (or minib-p evil-hl-p (bound-and-true-p doom-popup-mode))
|
(when evil-hl-p (evil-ex-nohighlight))
|
||||||
(doom/popup-close-all))))
|
;; Close non-repl popups and clean up `doom-popup-windows'
|
||||||
|
(unless (or minib-p evil-hl-p)
|
||||||
|
(doom/popup-close-all)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom*evil-ex-replace-special-filenames (file-name)
|
(defun doom*evil-ex-replace-special-filenames (file-name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue