mirror of
https://github.com/preservim/nerdtree.git
synced 2024-10-18 22:00:21 +03:00
refactor away from Path.strForCd() (since it was removed earlier)
This commit is contained in:
parent
e5c79fc5c1
commit
a1e7bc0b01
@ -1797,9 +1797,9 @@ function! s:Path.cacheDisplayString()
|
|||||||
endfunction
|
endfunction
|
||||||
"FUNCTION: Path.changeToDir() {{{3
|
"FUNCTION: Path.changeToDir() {{{3
|
||||||
function! s:Path.changeToDir()
|
function! s:Path.changeToDir()
|
||||||
let dir = self.strForCd()
|
let dir = self.str({'format': 'Cd'})
|
||||||
if self.isDirectory ==# 0
|
if self.isDirectory ==# 0
|
||||||
let dir = self.getParent().strForCd()
|
let dir = self.getParent().str({'format': 'Cd'})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -2428,7 +2428,7 @@ function! s:initNerdTree(name)
|
|||||||
"if instructed to, then change the vim CWD to the dir the NERDTree is
|
"if instructed to, then change the vim CWD to the dir the NERDTree is
|
||||||
"inited in
|
"inited in
|
||||||
if g:NERDTreeChDirMode != 0
|
if g:NERDTreeChDirMode != 0
|
||||||
exec 'cd ' . path.strForCd()
|
call path.changeToDir()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if s:treeExistsForTab()
|
if s:treeExistsForTab()
|
||||||
@ -3927,7 +3927,7 @@ function! s:upDir(keepState)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if g:NERDTreeChDirMode ==# 2
|
if g:NERDTreeChDirMode ==# 2
|
||||||
exec 'cd ' . b:NERDTreeRoot.path.strForCd()
|
call b:NERDTreeRoot.path.changeToDir()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call s:renderView()
|
call s:renderView()
|
||||||
|
Loading…
Reference in New Issue
Block a user