1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:40:05 +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,6 +153,23 @@ function! bookmarks#next() abort
call s:jump_to_bookmark(s:bookmarks[file][lnum])
endif
endfor
else
call s:NT.notify('no bookmarks found')
endif
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