mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
clear_all_highlights: check if buffer is loaded (#709)
when buffer is not loaded, len(getbufline(...)) returns 0, calling prop_remove(..., lnum=1, lnum-end=0) which fails with invalid range error
This commit is contained in:
@@ -78,7 +78,7 @@ function! s:clear_all_highlights() abort
|
||||
endif
|
||||
|
||||
for l:bufnr in range(1, bufnr('$'))
|
||||
if bufexists(l:bufnr)
|
||||
if bufexists(l:bufnr) && bufloaded(l:bufnr)
|
||||
call prop_remove({
|
||||
\ 'type': l:prop_type,
|
||||
\ 'bufnr': l:bufnr,
|
||||
|
||||
Reference in New Issue
Block a user