Skip to content

Commit 19090fe

Browse files
author
Daniel Hakimian
committed
Update the jumplist when jumping between references
The previous jump method (using G) set a jump, but cursor() doesn't, so we manually update the jumplist before moving the cursor so as to not take away previously existing functionality (the ability to use <C-O> to undo a jump)
1 parent 0d1af5a commit 19090fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

autoload/lsp/ui/vim/references.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,6 @@ function! lsp#ui#vim#references#jump(offset) abort
221221

222222
" Jump
223223
let l:target = w:lsp_reference_positions[l:index][0:1]
224+
normal! m`
224225
call cursor(l:target[0], l:target[1])
225226
endfunction

0 commit comments

Comments
 (0)