Improve popup + doom buffer handling
This commit is contained in:
parent
f14f427744
commit
ef9b59197a
4 changed files with 30 additions and 33 deletions
|
@ -114,10 +114,12 @@
|
|||
(local-set-key [escape escape] 'doom/popup-close)
|
||||
(let ((map evil-normal-state-local-map))
|
||||
(define-key map [escape escape] 'doom/popup-close)
|
||||
(unless (apply #'derived-mode-p doom-popup-inescapable-modes)
|
||||
(unless (or (apply #'derived-mode-p doom-popup-inescapable-modes)
|
||||
(--any? (string-match-p it buffer-name) (-filter 'stringp doom-popup-inescapable-modes)))
|
||||
(define-key map [escape] 'doom/popup-close)
|
||||
(define-key map (kbd "ESC") 'doom/popup-close)))
|
||||
(when (apply #'derived-mode-p doom-popup-protect-modes)
|
||||
(when (or (apply #'derived-mode-p doom-popup-protect-modes)
|
||||
(--any? (string-match-p it buffer-name) (-filter 'stringp doom-popup-protect-modes)))
|
||||
(setq-local doom-popup-protect t)
|
||||
(setq doom-last-popup (current-buffer))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue