Update diagnostic virtual text marker

neovim_0.6
ray-x 3 years ago
parent e56eeb4f88
commit 97b265a64d

@ -112,9 +112,9 @@ local function error_marker(result, ctx, config)
p = diag.range.start.line
p = util.round(p * wheight / math.max(wheight, total_num))
if pos[#pos] and pos[#pos].line == p then
local bar = ''
if pos[#pos] == _NgConfigValues.lsp.diagnostic_scrollbar_sign[2] then
bar = ''
local bar = _NgConfigValues.lsp.diagnostic_scrollbar_sign[2]
if pos[#pos] == bar then
bar = _NgConfigValues.lsp.diagnostic_scrollbar_sign[3]
end
pos[#pos] = {line = p, sign = bar, severity = math.min(diag.severity, pos[#pos].severity)}
else

@ -27,7 +27,7 @@ M.path_cur = function()
end
M.round = function(x)
return math.floor(x + 0.5)
return math.max(0, math.floor(x - 0.5))
end
function M.get_data_from_file(filename, startLine)

Loading…
Cancel
Save