Fix neotree-show when open in other frame/session

Annoying when neotree is open in one emacsclient frame (possibly buried)
and you're trying to open a neotree pane in another.
This commit is contained in:
Henrik Lissner 2017-06-14 21:04:17 +02:00
parent 816df321a5
commit fbc93783fe
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -8,9 +8,9 @@
(project-root (doom-project-root)))
(require 'neotree)
(cond ((and (neo-global--window-exists-p)
(window-live-p neo-global--buffer)
(eq (current-buffer) neo-global--buffer))
(neotree-hide))
(get-buffer-window neo-buffer-name t))
(neotree-hide)
(neotree-find path project-root))
((not (and (neo-global--window-exists-p)
(equal (file-truename (neo-global--with-buffer neo-buffer--start-node))
(file-truename project-root))))