check for nonexistent marks
This commit is contained in:
parent
219d16f61a
commit
6e60ecfee1
@ -2864,7 +2864,13 @@ endfunction
|
|||||||
" FUNCTION: s:RecallMark(name) {{{2
|
" FUNCTION: s:RecallMark(name) {{{2
|
||||||
" put the cursor on the node associate with the given name
|
" put the cursor on the node associate with the given name
|
||||||
function! s:RecallMark(name)
|
function! s:RecallMark(name)
|
||||||
|
try
|
||||||
let mark = s:GetMarks()[a:name]
|
let mark = s:GetMarks()[a:name]
|
||||||
|
catch /E716/ "key not in dictionary error
|
||||||
|
call s:Echo("Invalid mark name")
|
||||||
|
return
|
||||||
|
endtry
|
||||||
|
|
||||||
let targetNode = t:NERDTreeRoot.FindNode(mark)
|
let targetNode = t:NERDTreeRoot.FindNode(mark)
|
||||||
call s:PutCursorOnNode(targetNode, 0, 1)
|
call s:PutCursorOnNode(targetNode, 0, 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user