From 8529b6f0e3d08366e50b23d50fa15d73584d9bd6 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sat, 7 Jun 2008 18:11:48 +1200 Subject: [PATCH] add s:ClearAllMark() and refactor to use it --- plugin/NERD_tree.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index dea18af..578f537 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -1369,6 +1369,11 @@ function! s:BufInWindows(bnum) return cnt endfunction " >>> +"FUNCTION: s:ClearAllMarks() {{{2 +"delete all marks +function! s:ClearAllMarks() + let t:NERDTreeMarks = {} +endfunction "FUNCTION: s:GetNodeForMark(name, searchFromAbsoluteRoot) {{{2 "get the treenode for the mark with the given name " @@ -2479,7 +2484,7 @@ function! s:BindMappings() command! -buffer -complete=customlist,s:FindMarks -nargs=1 OpenMark :call OpenMark('') command! -buffer -complete=customlist,s:FindMarks -nargs=+ ClearMarks call ClearMarks('') command! -buffer -complete=customlist,s:FindMarks -nargs=+ MarkToRoot call MarkToRoot('') - command! -buffer -nargs=0 ClearAllMarks let t:NERDTreeMarks = {} call RenderView() + command! -buffer -nargs=0 ClearAllMarks call ClearAllMarks() call RenderView() endfunction "FUNCTION: s:CheckForActivate() {{{2