Skip to content

Commit 9649d3f

Browse files
authored
fix: E684: List index out of range: 0 (#1481)
1 parent 7233bb2 commit 9649d3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/lsp/internal/diagnostics/highlights.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ endif
2828
function! lsp#internal#diagnostics#highlights#_enable() abort
2929
" don't even bother registering if the feature is disabled
3030
if !lsp#utils#_has_highlights() | return | endif
31-
if !g:lsp_diagnostics_highlights_enabled | return | endif
31+
if !g:lsp_diagnostics_highlights_enabled | return | endif
3232

3333
if s:enabled | return | endif
3434
let s:enabled = 1
@@ -186,7 +186,7 @@ function! s:place_highlights(server, diagnostics_response, bufnr) abort
186186
if l:line == l:end_line
187187
let l:highlight_end_col = l:end_col
188188
else
189-
let l:highlight_end_col = strlen(getbufline(a:bufnr, l:line, l:line)[0]) + 1
189+
let l:highlight_end_col = strlen(getbufoneline(a:bufnr, l:line)) + 1
190190
endif
191191

192192
try

0 commit comments

Comments
 (0)