From fc3cb766953f6d1b1ccf57fc9e467f1f3b688f53 Mon Sep 17 00:00:00 2001 From: marty Date: Wed, 12 Aug 2009 01:49:48 +1200 Subject: [PATCH] remove a redundant function --- plugin/NERD_tree.vim | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 79306b8..63f7eff 100644 --- 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)