commit 5939fdb14077863e2f32728c46d7efc8c4f30eb6 parent 9dd850b672aa32b163cda47656cb160af44fa64d Author: Martin Grenfell <martin_grenfell@msn.com> Date: Sun, 13 Jul 2008 21:03:33 +1200 add s:ValidateBookmark() Diffstat:
| M | plugin/NERD_tree.vim | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim @@ -2789,6 +2789,17 @@ function! s:Toggle(dir) call s:InitNerdTree(a:dir) endif endfunction + +"FUNCTION: s:ValidateBookmark(bookmark) {{{2 +function! s:ValidateBookmark(bookmark) + try + call a:bookmark.MustExist() + catch /NERDTree.BookmarkPointsToInvalidLocation/ + call s:RenderView() + throw v:exception + endtry +endfunction + "SECTION: Interface bindings {{{1 "============================================================ "FUNCTION: s:ActivateNode(forceKeepWindowOpen) {{{2
