1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:30:05 +08:00

fix(bookmark): remove sign before add new bookmark

This commit is contained in:
Eric Wong 2024-03-29 10:38:26 +08:00
parent 8649032dc5
commit ac148697e4

View File

@ -61,6 +61,9 @@ function! bookmarks#add(file, lnum, text, ...) abort
if has_key(s:bookmarks[a:file], a:lnum) && has_key(s:bookmarks[a:file][a:lnum], 'vtextid')
call bookmarks#vtext#delete(a:file, s:bookmarks[a:file][a:lnum].vtextid)
endif
if has_key(s:bookmarks[a:file], a:lnum) && has_key(s:bookmarks[a:file][a:lnum], 'signid')
exe 'sign unplace ' . s:bookmarks[a:file][a:lnum].signid
endif
let s:bookmarks[a:file][a:lnum] = {
\ 'text' : a:text,
\ 'file' : a:file,