Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit e3c3bf4

Browse files
committed
fix: only show symbol when diagnostic_trimmed virtual text = 0(#17)
1 parent 5087184 commit e3c3bf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/diagnostic/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function M.buf_diagnostics_virtual_text(bufnr, diagnostics)
252252
if api.nvim_get_var('diagnostic_trimmed_virtual_text') ~= nil then
253253
local trimmed_text = last.message:gsub("\r", ""):gsub("\n", " ")
254254
trimmed_text = string.sub(trimmed_text, 1, api.nvim_get_var('diagnostic_trimmed_virtual_text'))
255-
if #trimmed_text == api.nvim_get_var('diagnostic_trimmed_virtual_text') then
255+
if #trimmed_text == api.nvim_get_var('diagnostic_trimmed_virtual_text') and vim.g.diagnostic_trimmed_virtual_text ~= 0 then
256256
trimmed_text = trimmed_text.."..."
257257
end
258258
table.insert(virt_texts, {prefix.." "..trimmed_text, severity_highlights[last.severity]})

0 commit comments

Comments
 (0)