mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 09:10:04 +08:00
fix(bookmarks): unlet bookmarks when clear
This commit is contained in:
parent
3a22f555dd
commit
34c343b697
@ -65,6 +65,9 @@ function! bookmarks#delete(file, lnum) abort
|
|||||||
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
|
||||||
unlet s:bookmarks[a:file][a:lnum]
|
unlet s:bookmarks[a:file][a:lnum]
|
||||||
|
if empty(s:bookmarks[a:file])
|
||||||
|
unlet s:bookmarks[a:file]
|
||||||
|
endif
|
||||||
call bookmarks#cache#write(s:bookmarks)
|
call bookmarks#cache#write(s:bookmarks)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@ -130,6 +133,7 @@ function! bookmarks#clear() abort
|
|||||||
for lnum in keys(s:bookmarks[file])
|
for lnum in keys(s:bookmarks[file])
|
||||||
call bookmarks#delete(file, lnum)
|
call bookmarks#delete(file, lnum)
|
||||||
endfor
|
endfor
|
||||||
|
unlet s:bookmarks[file]
|
||||||
endif
|
endif
|
||||||
|
call bookmarks#cache#write(s:bookmarks)
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user