use the cwd instead of the dir of the current file for :NERDTree

This commit is contained in:
Martin Grenfell 2008-11-29 00:06:59 +13:00
parent a59a2f6177
commit d49c742daf

View File

@ -1668,8 +1668,9 @@ function! s:initNerdTree(name)
if s:Bookmark.BookmarkExistsFor(a:name)
let path = s:Bookmark.BookmarkFor(a:name).path
else
let dir = a:name == '' ? expand('%:p:h') : a:name
let dir = a:name == '' ? getcwd() : a:name
let dir = resolve(dir)
try
let path = s:Path.New(dir)
catch /NERDTree.Path.InvalidArguments/