commit fc3cb766953f6d1b1ccf57fc9e467f1f3b688f53
parent 389f33ea81d99a1a5c44d18e657b17411ca11eb4
Author: marty <marty@rodney.(none)>
Date: Wed, 12 Aug 2009 01:49:48 +1200
remove a redundant function
Diffstat:
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -1077,7 +1077,7 @@ function! s:TreeFileNode.rename(newName)
call self.path.rename(newName)
call self.parent.removeChild(self)
- let parentPath = self.path.getPathTrunk()
+ let parentPath = self.path.getParent()
let newParent = b:NERDTreeRoot.findNode(parentPath)
if newParent != {}
@@ -1596,7 +1596,7 @@ endfunction
function! s:Path.changeToDir()
let dir = self.strForCd()
if self.isDirectory ==# 0
- let dir = self.getPathTrunk().strForCd()
+ let dir = self.getParent().strForCd()
endif
try
@@ -1817,12 +1817,6 @@ function! s:Path.getLastPathComponent(dirSlash)
return toReturn
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
"returns the index of the pattern in g:NERDTreeSortOrder that this path matches
function! s:Path.getSortOrderIndex()
@@ -3702,7 +3696,7 @@ function! s:upDir(keepState)
let oldRoot = b:NERDTreeRoot
if empty(b:NERDTreeRoot.parent)
- let path = b:NERDTreeRoot.path.getPathTrunk()
+ let path = b:NERDTreeRoot.path.getParent()
let newRoot = s:TreeDirNode.New(path)
call newRoot.open()
call newRoot.transplantChild(b:NERDTreeRoot)