commit 65ebd30334fceedced72d2a2b956777f9814dabe
parent 1998cef2b4b2f3f6ddba981239a9a96ac26ed4d4
Author: Martin Grenfell <martin_grenfell@msn.com>
Date: Mon, 30 Jun 2008 18:26:35 +1200
fix a bug when overwriting an existing bookmark
if the bookmark wasnt cached in the tree an exception was being thrown
that wasnt caught
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -243,7 +243,7 @@ function! s:oBookmark.Delete() dict
let node = {}
try
let node = self.GetNode(1)
- catch /NERDTree.BookmarkNodeNotFound/
+ catch /NERDTree.BookmarkNotFound/
endtry
call remove(s:oBookmark.Bookmarks(), index(s:oBookmark.Bookmarks(), self))
if !empty(node)
@@ -260,7 +260,7 @@ function! s:oBookmark.GetNode(searchFromAbsoluteRoot) dict
let searchRoot = a:searchFromAbsoluteRoot ? s:AbsoluteTreeRoot() : t:NERDTreeRoot
let targetNode = searchRoot.FindNode(self.path)
if empty(targetNode)
- throw "NERDTree.BookmarkNodeNotFound no node was found for bookmark: " . self.name
+ throw "NERDTree.BookmarkNotFound no node was found for bookmark: " . self.name
endif
return targetNode
endfunction
@@ -2810,7 +2810,7 @@ endfunction
function! s:BookmarkToRoot(name)
try
let targetNode = s:oBookmark.GetNodeForName(a:name, 1)
- catch /NERDTree.BookmarkNodeNotFound/
+ catch /NERDTree.BookmarkNotFound/
let targetNode = s:oTreeFileNode.New(s:oBookmark.BookmarkFor(a:name).path)
endtry
call targetNode.MakeRoot()