We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 730f1c4 commit 8f48b74Copy full SHA for 8f48b74
autoload/lsp/utils/location.vim
@@ -81,13 +81,14 @@ function! s:lsp_location_item_to_vim(loc, cache) abort
81
endif
82
83
if l:use_link
84
+ " viewstart/end decremented to account for incrementing in _lsp_to_vim
85
return {
86
\ 'filename': l:path,
87
\ 'lnum': l:line,
88
\ 'col': l:col,
89
\ 'text': l:text,
- \ 'viewstart': lsp#utils#position#_lsp_to_vim(l:path, a:loc['targetRange']['start'])[0],
90
- \ 'viewend': lsp#utils#position#_lsp_to_vim(l:path, a:loc['targetRange']['end'])[0],
+ \ 'viewstart': lsp#utils#position#_lsp_to_vim(l:path, a:loc['targetRange']['start'])[0] - 1,
91
+ \ 'viewend': lsp#utils#position#_lsp_to_vim(l:path, a:loc['targetRange']['end'])[0] - 1,
92
\ }
93
else
94
0 commit comments