allow relative paths for :NERDTree commands

This commit is contained in:
Martin Grenfell 2008-11-29 00:07:23 +13:00
parent d49c742daf
commit 22904e41de

View File

@ -1669,6 +1669,11 @@ function! s:initNerdTree(name)
let path = s:Bookmark.BookmarkFor(a:name).path let path = s:Bookmark.BookmarkFor(a:name).path
else else
let dir = a:name == '' ? getcwd() : a:name let dir = a:name == '' ? getcwd() : a:name
"hack to get an absolute path is a relative path is given
if dir =~ '^\.'
let dir = getcwd() . s:os_slash . dir
endif
let dir = resolve(dir) let dir = resolve(dir)
try try