Skip to content

Commit

Permalink
diagnostics/highlights: add patch check for getbufoneline() (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
vimuxx authored Nov 20, 2023
1 parent ee2bb88 commit dbe8b17
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 dbe8b17

Please sign in to comment.