fix(highlight): compare rows vs columns in range highlight check (#12852)

This commit is contained in:
Steven Sojka
2020-09-05 16:22:54 -05:00
committed by GitHub
parent 858c056133
commit fb55cb2d91

View File

@@ -14,7 +14,7 @@ function highlight.range(bufnr, ns, higroup, start, finish, rtype, inclusive)
inclusive = inclusive or false
-- sanity check
if start[2] < 0 or finish[2] < start[2] then return end
if start[2] < 0 or finish[1] < start[1] then return end
local region = vim.region(bufnr, start, finish, rtype, inclusive)
for linenr, cols in pairs(region) do