You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let name =a:is_annotation==# 1 ? "BookmarkAnnotation" : "Bookmark"
execute"sign place ". a:sign_idx ." line=" . a:line_nr ." name=". name ." file=". a:file
if (a:sign_idx>=#g:bm_sign_index)
letg:bm_sign_index=a:sign_idx+1
endif
endfunction
If a:file is associated to a buffer which is not already open, the sign place command will obviously fail, thus the plugin will report the Failed to load/parse file error.
This could be easily fixed by adding the following at the beginning of the bm_sign#add_at function:
ifbufnr(a:file) ==# -1returnendif
So if a bookmarked file is not already opened in Vim, the sign place command won't be called, thus avoiding the exception.
The text was updated successfully, but these errors were encountered:
When loading bookmarks with
BookmarkLoad
, the plugin sometimes return an error stating:This happens because of the
sign place
command, which could be called with a file argument associated to a buffer which hasn't been opened yet:vim-bookmarks/autoload/bm_sign.vim
Lines 47 to 55 in 9cc5fa7
If
a:file
is associated to a buffer which is not already open, the sign place command will obviously fail, thus the plugin will report theFailed to load/parse file error
.This could be easily fixed by adding the following at the beginning of the
bm_sign#add_at
function:So if a bookmarked file is not already opened in Vim, the
sign place
command won't be called, thus avoiding the exception.The text was updated successfully, but these errors were encountered: