Refactor popup implementation

This commit is contained in:
Henrik Lissner 2016-04-19 03:12:25 -04:00
parent 008cee1afc
commit e2a60e8a9d
5 changed files with 39 additions and 22 deletions

View file

@ -97,13 +97,14 @@
(ignore-errors
(evil-ex-nohighlight))
;; Close non-repl popups and clean up `narf-popup-windows'
(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))
(unless (memq (get-buffer-window) narf-popup-windows)
(mapc (lambda (w)
(if (window-live-p w)
(with-selected-window w
(unless (derived-mode-p 'comint-mode)
(narf/popup-close w)))
(narf--popup-remove w)))
narf-popup-windows)))
;; Fix disruptive errors w/ hidden buffers caused by workgroups killing windows
;; TODO Delete timer on dead windows