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))))
|
||||
(if in-neotree
|
||||
(neotree-hide)
|
||||
(unless (neo-global--window-exists-p)
|
||||
(neotree-dir (narf/project-root)))
|
||||
(let ((project-root (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))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue