remove a redundant function
This commit is contained in:
parent
389f33ea81
commit
fc3cb76695
@ -1077,7 +1077,7 @@ function! s:TreeFileNode.rename(newName)
|
|||||||
call self.path.rename(newName)
|
call self.path.rename(newName)
|
||||||
call self.parent.removeChild(self)
|
call self.parent.removeChild(self)
|
||||||
|
|
||||||
let parentPath = self.path.getPathTrunk()
|
let parentPath = self.path.getParent()
|
||||||
let newParent = b:NERDTreeRoot.findNode(parentPath)
|
let newParent = b:NERDTreeRoot.findNode(parentPath)
|
||||||
|
|
||||||
if newParent != {}
|
if newParent != {}
|
||||||
@ -1596,7 +1596,7 @@ endfunction
|
|||||||
function! s:Path.changeToDir()
|
function! s:Path.changeToDir()
|
||||||
let dir = self.strForCd()
|
let dir = self.strForCd()
|
||||||
if self.isDirectory ==# 0
|
if self.isDirectory ==# 0
|
||||||
let dir = self.getPathTrunk().strForCd()
|
let dir = self.getParent().strForCd()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -1817,12 +1817,6 @@ function! s:Path.getLastPathComponent(dirSlash)
|
|||||||
return toReturn
|
return toReturn
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: Path.getPathTrunk() {{{3
|
|
||||||
"Gets the path without the last segment on the end.
|
|
||||||
function! s:Path.getPathTrunk()
|
|
||||||
return s:Path.New(self.strTrunk())
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
"FUNCTION: Path.getSortOrderIndex() {{{3
|
"FUNCTION: Path.getSortOrderIndex() {{{3
|
||||||
"returns the index of the pattern in g:NERDTreeSortOrder that this path matches
|
"returns the index of the pattern in g:NERDTreeSortOrder that this path matches
|
||||||
function! s:Path.getSortOrderIndex()
|
function! s:Path.getSortOrderIndex()
|
||||||
@ -3702,7 +3696,7 @@ function! s:upDir(keepState)
|
|||||||
let oldRoot = b:NERDTreeRoot
|
let oldRoot = b:NERDTreeRoot
|
||||||
|
|
||||||
if empty(b:NERDTreeRoot.parent)
|
if empty(b:NERDTreeRoot.parent)
|
||||||
let path = b:NERDTreeRoot.path.getPathTrunk()
|
let path = b:NERDTreeRoot.path.getParent()
|
||||||
let newRoot = s:TreeDirNode.New(path)
|
let newRoot = s:TreeDirNode.New(path)
|
||||||
call newRoot.open()
|
call newRoot.open()
|
||||||
call newRoot.transplantChild(b:NERDTreeRoot)
|
call newRoot.transplantChild(b:NERDTreeRoot)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user