mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
add s:ClearAllMark() and refactor to use it
This commit is contained in:
@@ -1369,6 +1369,11 @@ function! s:BufInWindows(bnum)
|
|||||||
return cnt
|
return cnt
|
||||||
endfunction " >>>
|
endfunction " >>>
|
||||||
|
|
||||||
|
"FUNCTION: s:ClearAllMarks() {{{2
|
||||||
|
"delete all marks
|
||||||
|
function! s:ClearAllMarks()
|
||||||
|
let t:NERDTreeMarks = {}
|
||||||
|
endfunction
|
||||||
"FUNCTION: s:GetNodeForMark(name, searchFromAbsoluteRoot) {{{2
|
"FUNCTION: s:GetNodeForMark(name, searchFromAbsoluteRoot) {{{2
|
||||||
"get the treenode for the mark with the given name
|
"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 <SID>OpenMark('<args>')
|
command! -buffer -complete=customlist,s:FindMarks -nargs=1 OpenMark :call <SID>OpenMark('<args>')
|
||||||
command! -buffer -complete=customlist,s:FindMarks -nargs=+ ClearMarks call <SID>ClearMarks('<args>')
|
command! -buffer -complete=customlist,s:FindMarks -nargs=+ ClearMarks call <SID>ClearMarks('<args>')
|
||||||
command! -buffer -complete=customlist,s:FindMarks -nargs=+ MarkToRoot call <SID>MarkToRoot('<args>')
|
command! -buffer -complete=customlist,s:FindMarks -nargs=+ MarkToRoot call <SID>MarkToRoot('<args>')
|
||||||
command! -buffer -nargs=0 ClearAllMarks let t:NERDTreeMarks = {} <bar> call <SID>RenderView()
|
command! -buffer -nargs=0 ClearAllMarks call <SID>ClearAllMarks() <bar> call <SID>RenderView()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: s:CheckForActivate() {{{2
|
"FUNCTION: s:CheckForActivate() {{{2
|
||||||
|
|||||||
Reference in New Issue
Block a user