Use prop_remove before adding virtual text (#1411)

This commit is contained in:
Marcin Szamotulski
2022-12-28 20:33:51 +01:00
committed by GitHub
parent 2cb7ef587c
commit 3f6e23f3d8

View File

@@ -176,7 +176,8 @@ function! s:place_virtual_text(server, diagnostics_response, bufnr) abort
" anymore due to async processing, just skip such diagnostics
if l:line <= getbufinfo(a:bufnr)[0].linecount
let l:type = 'vim_lsp_' . l:name . '_virtual_text'
call prop_add(l:line, 0, {'type': l:type, 'text': l:text, 'text_padding_left': 1, 'bufnr': a:bufnr})
call prop_remove({'all': v:true, 'type': l:type, 'bufnr': a:bufnr}, l:line)
call prop_add(l:line, 0, {'type': l:type, 'text': l:text, 'text_padding_left': 1, 'bufnr': a:bufnr, 'text_align': 'below', 'text_wrap': 'wrap'})
endif
endif
endfor