neotree: don't spawn two windows in another project's file
This commit is contained in:
parent
53ac744800
commit
4cddc4ac72
1 changed files with 4 additions and 2 deletions
|
@ -10,8 +10,10 @@
|
||||||
(eq (current-buffer) neo-global--buffer))))
|
(eq (current-buffer) neo-global--buffer))))
|
||||||
(if in-neotree
|
(if in-neotree
|
||||||
(neotree-hide)
|
(neotree-hide)
|
||||||
(unless (neo-global--window-exists-p)
|
(let ((project-root (narf/project-root)))
|
||||||
(neotree-dir (narf/project-root)))
|
(unless (and (neo-global--window-exists-p)
|
||||||
|
(f-same? (neo-global--with-window neo-buffer--start-node) project-root))
|
||||||
|
(neotree-dir project-root)))
|
||||||
(neotree-find))))
|
(neotree-find))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue