Implement PR review comments.
This commit is contained in:
parent
18071f5999
commit
c726ec7318
@ -142,8 +142,8 @@ The following features and functionality are provided by the NERD tree:
|
|||||||
current tab does not exist, a new one will be initialized.
|
current tab does not exist, a new one will be initialized.
|
||||||
|
|
||||||
:NERDTreeCWD *:NERDTreeCWD*
|
:NERDTreeCWD *:NERDTreeCWD*
|
||||||
Change tree root to current directory. If no NERD tree exists for this
|
Change the NERDTree root to the current working directory. If no NERDTree
|
||||||
tab, a new tree will be opened.
|
exists for this tab, a new one is opened.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2. Bookmarks *NERDTreeBookmarks*
|
2.2. Bookmarks *NERDTreeBookmarks*
|
||||||
|
@ -202,12 +202,15 @@ function! NERDTreeFocus()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! NERDTreeCWD()
|
function! NERDTreeCWD()
|
||||||
let l:cwd = getcwd()
|
let l:cwdPath = g:NERDTreePath.New(getcwd())
|
||||||
call NERDTreeFocus()
|
call NERDTreeFocus()
|
||||||
if l:cwd != getcwd()
|
|
||||||
exec 'cd '.l:cwd
|
if b:NERDTree.root.path.equals(l:cwdPath)
|
||||||
|
return
|
||||||
endif
|
endif
|
||||||
call nerdtree#ui_glue#chRootCwd()
|
|
||||||
|
let l:newRoot = g:NERDTreeFileNode.New(l:cwdPath, b:NERDTree)
|
||||||
|
call b:NERDTree.changeRoot(l:newRoot)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! NERDTreeAddPathFilter(callback)
|
function! NERDTreeAddPathFilter(callback)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user