1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00

fix(bookmarks): fix mn & mp key bindings

This commit is contained in:
Eric Wong 2024-03-30 22:24:22 +08:00
parent 99738624b4
commit 5816fbbbfa

View File

@ -153,10 +153,27 @@ function! bookmarks#next() abort
call s:jump_to_bookmark(s:bookmarks[file][lnum]) call s:jump_to_bookmark(s:bookmarks[file][lnum])
endif endif
endfor endfor
else
call s:NT.notify('no bookmarks found')
endif endif
endfunction endfunction
function! bookmarks#previous() abort
let file = s:FILE.unify_path(expand('%'), ':p')
if has_key(s:bookmarks, file)
for lnum in reverse(keys(s:bookmarks[file]))
if lnum < line('.')
call s:jump_to_bookmark(s:bookmarks[file][lnum])
endif
endfor
else
call s:NT.notify('no bookmarks found')
endif
endfunction
function! bookmarks#showall() abort function! bookmarks#showall() abort
let qf = [] let qf = []
for [f, nrs] in items(s:bookmarks) for [f, nrs] in items(s:bookmarks)