Add an argument sigil in a Bookmark class method
A missing argument sigil is effectively a syntax error in VimL. The function in which the error occurred was called in the execution of at least three buffer-local NERDTree commands: 1. :Bookmark (specifically, when trying to overwrite a Bookmark) 2. :OpenBookmark 3. :RevealBookmark Only one specific type of error message associated with these commands is fixed here (see issue #677). The problems with the above commands are not fully addressed by this commit, and their behavior can be improved immensely by further refactoring. However, no one has been able to even use these commands at all before now because the fix given here was not in place. More work will need to be done to improve the behavior of these commands so that they truly function as any reasonable user would expect. Fixes #677.
This commit is contained in:
parent
b0f60552ea
commit
c0b90811b0
@ -172,11 +172,13 @@ function! s:Bookmark.getNode(nerdtree, searchFromAbsoluteRoot)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) {{{1
|
" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree) {{{1
|
||||||
" Class method that finds the bookmark with the given name and returns the
|
" Class method that returns the tree node object for the Bookmark with the
|
||||||
" treenode for it.
|
" given name. Throws "NERDTree.BookmarkNotFoundError" if a Bookmark with the
|
||||||
|
" name does not exist. Throws "NERDTree.BookmarkedNodeNotFoundError" if a
|
||||||
|
" tree node for the named Bookmark could not be found.
|
||||||
function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree)
|
function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot, nerdtree)
|
||||||
let bookmark = s:Bookmark.BookmarkFor(a:name)
|
let l:bookmark = s:Bookmark.BookmarkFor(a:name)
|
||||||
return bookmark.getNode(nerdtree, a:searchFromAbsoluteRoot)
|
return l:bookmark.getNode(a:nerdtree, a:searchFromAbsoluteRoot)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Bookmark.GetSelected() {{{1
|
" FUNCTION: Bookmark.GetSelected() {{{1
|
||||||
|
Loading…
Reference in New Issue
Block a user