From e8aadb77b8eab8c51b701a3b84fd8e5cea8efe55 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 13 Jul 2008 16:02:20 +1200 Subject: [PATCH] reposition a method in the file --- plugin/NERD_tree.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index c942119..8a7325a 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -1716,6 +1716,18 @@ endfunction " SECTION: View Functions {{{1 "============================================================ +" FUNCTION: s:BookmarkToRoot(name) {{{2 +" Make the node for the given bookmark the new tree root +function! s:BookmarkToRoot(name) + try + let targetNode = s:oBookmark.GetNodeForName(a:name, 1) + catch /NERDTree.BookmarkNotFound/ + let targetNode = s:oTreeFileNode.New(s:oBookmark.BookmarkFor(a:name).path) + endtry + call targetNode.MakeRoot() + call s:RenderView() + call s:PutCursorOnNode(targetNode, 0, 0) +endfunction "FUNCTION: s:CenterView() {{{2 "centers the nerd tree window around the cursor (provided the nerd tree "options permit) @@ -2855,18 +2867,6 @@ function! s:BookmarkNode(name) call s:Echo("select a node first") endif endfunction -" FUNCTION: s:BookmarkToRoot(name) {{{2 -" Make the node for the given bookmark the new tree root -function! s:BookmarkToRoot(name) - try - let targetNode = s:oBookmark.GetNodeForName(a:name, 1) - catch /NERDTree.BookmarkNotFound/ - let targetNode = s:oTreeFileNode.New(s:oBookmark.BookmarkFor(a:name).path) - endtry - call targetNode.MakeRoot() - call s:RenderView() - call s:PutCursorOnNode(targetNode, 0, 0) -endfunction "FUNCTION: s:CheckForActivate() {{{2 "Checks if the click should open the current node, if so then activate() is "called (directories are automatically opened if the symbol beside them is