1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 01:40: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') 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) call bookmarks#vtext#delete(a:file, s:bookmarks[a:file][a:lnum].vtextid)
endif 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] = { let s:bookmarks[a:file][a:lnum] = {
\ 'text' : a:text, \ 'text' : a:text,
\ 'file' : a:file, \ 'file' : a:file,