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

Commit 4255eb7

Browse files
committed
fix: invalid highlight range
1 parent e3c3bf4 commit 4255eb7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lua/diagnostic/util.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ local function split_lines(value)
1212
end
1313

1414
local function highlight_range(bufnr, ns, hiname, start, finish)
15+
if start[2] < 0 or finish[2] < start[2] then return end
1516
if start[1] == finish[1] then
1617
api.nvim_buf_add_highlight(bufnr, ns, hiname, start[1], start[2], finish[2])
1718
else

0 commit comments

Comments
 (0)