mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
use the cwd instead of the dir of the current file for :NERDTree
This commit is contained in:
@@ -1668,8 +1668,9 @@ function! s:initNerdTree(name)
|
|||||||
if s:Bookmark.BookmarkExistsFor(a:name)
|
if s:Bookmark.BookmarkExistsFor(a:name)
|
||||||
let path = s:Bookmark.BookmarkFor(a:name).path
|
let path = s:Bookmark.BookmarkFor(a:name).path
|
||||||
else
|
else
|
||||||
let dir = a:name == '' ? expand('%:p:h') : a:name
|
let dir = a:name == '' ? getcwd() : a:name
|
||||||
let dir = resolve(dir)
|
let dir = resolve(dir)
|
||||||
|
|
||||||
try
|
try
|
||||||
let path = s:Path.New(dir)
|
let path = s:Path.New(dir)
|
||||||
catch /NERDTree.Path.InvalidArguments/
|
catch /NERDTree.Path.InvalidArguments/
|
||||||
|
|||||||
Reference in New Issue
Block a user