mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 22:10:45 +00:00
fix(highlight): compare rows vs columns in range highlight check (#12852)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user