nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 1d9564db54030fe632d74c1c19184a168ebd14dd
parent c63e183acfe581972861c99cec8ee17e8483272e
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Sun,  8 Jun 2008 21:53:25 +1200

improve the error handling of RecallMark()

Diffstat:
Mplugin/NERD_tree.vim | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2989,8 +2989,12 @@ endfunction
 " FUNCTION: s:RecallMark(name) {{{2
 " put the cursor on the node associate with the given name
 function! s:RecallMark(name)
-    let targetNode = s:GetNodeForMark(a:name, 0)
-    call s:PutCursorOnNode(targetNode, 0, 1)
+    try
+        let targetNode = s:GetNodeForMark(a:name, 0)
+        call s:PutCursorOnNode(targetNode, 0, 1)
+    catch /NERDTree.MarkDoesntExist/
+        call s:Echo("Mark isnt cached under the current root")
+    endtry
 endfunction
 " FUNCTION: s:RefreshRoot() {{{2
 " Reloads the current root. All nodes below this will be lost and the root dir