Skip to content

Commit

Permalink
Fix multiple diagnostic virtual text per-line of same severity in vim
Browse files Browse the repository at this point in the history
Remove the prop_remove just before prop_add in place_virtual_text, since
this function is called after clear_virtual_text is called to clear the
previously added virtual text.

That way, if there are multiple virtual text to place on the same line
with the same severity, the following ones don't replace the former
ones.  Besides, the branch for neovim wasn't removing any property, so
this should make it consistent with neovim.
  • Loading branch information
dylanahsmith committed Feb 21, 2024
1 parent 2829332 commit 15be5fd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion autoload/lsp/internal/diagnostics/virtual_text.vim
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ function! s:place_virtual_text(server, diagnostics_response, bufnr) abort
" anymore due to async processing, just skip such diagnostics
if l:line <= l:linecount
let l:type = 'vim_lsp_' . l:name . '_virtual_text'
call prop_remove({'all': v:true, 'type': l:type, 'bufnr': a:bufnr}, l:line)
call prop_add(
\ l:line, 0,
\ {
Expand Down

0 comments on commit 15be5fd

Please sign in to comment.