Skip to content

Commit

Permalink
diagnostics/highlights: add patch check for getbufoneline() (prabirsh…
Browse files Browse the repository at this point in the history
  • Loading branch information
vimuxx authored and ompugao committed Dec 9, 2023
1 parent 78080c9 commit 5ddcd8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoload/lsp/internal/diagnostics/highlights.vim
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ function! s:place_highlights(server, diagnostics_response, bufnr) abort
if l:line == l:end_line
let l:highlight_end_col = l:end_col
else
let l:highlight_end_col = strlen(getbufoneline(a:bufnr, l:line)) + 1
if has('patch-9.0.0916')
let l:highlight_end_col = strlen(getbufoneline(a:bufnr, l:line)) + 1
else
let l:highlight_end_col = strlen(getbufline(a:bufnr, l:line)[0]) + 1
endif
endif

try
Expand Down

0 comments on commit 5ddcd8a

Please sign in to comment.