Make neotree cooperate with popups and other window-changing actions

This commit is contained in:
Henrik Lissner 2017-01-08 15:35:50 -05:00
parent ea2372f025
commit f376006284
3 changed files with 24 additions and 4 deletions

View file

@ -17,10 +17,17 @@
(neotree-dir project-root))
(neotree-find path project-root)))))
;;;###autoload
(defun doom/neotree-close ()
(interactive)
(when (neo-global--window-exists-p)
(with-selected-window neo-global--window
(evil-window-delete))))
;;;###autoload
(defmacro doom/neotree-save (&rest body)
`(let ((neo-p (neo-global--window-exists-p)))
(when neo-p (neotree-hide))
(when neo-p (doom/neotree-close))
,@body
(when neo-p
(save-selected-window