evil: Smarter closing of popups on evil-force-normal-mode

This commit is contained in:
Henrik Lissner 2016-02-19 12:34:33 -05:00
parent 9b872e95a4
commit 34c83c0d69

View file

@ -97,8 +97,14 @@
(narf-minibuffer-quit)) (narf-minibuffer-quit))
(ignore-errors (ignore-errors
(evil-ex-nohighlight)) (evil-ex-nohighlight))
(unless (bound-and-true-p org-src-mode) ;; Close non-repl popups and clean up `narf-popup-windows'
(narf/popup-close))) (mapc (lambda (w)
(if (window-live-p w)
(with-selected-window w
(unless (derived-mode-p 'comint-mode)
(narf/popup-close w)))
(setq narf-popup-windows (delq w narf-popup-windows))))
narf-popup-windows))
;; Fix disruptive errors w/ hidden buffers caused by workgroups killing windows ;; Fix disruptive errors w/ hidden buffers caused by workgroups killing windows
;; TODO Delete timer on dead windows ;; TODO Delete timer on dead windows