add some extmark-edge-case tests from morph.nvim
Some checks failed
ci / ci (push) Failing after 3m20s

This commit is contained in:
2026-04-06 17:37:29 -06:00
parent 43837ac33a
commit 9383f0b3ef
2 changed files with 57 additions and 2 deletions

View File

@@ -360,7 +360,7 @@ function Extmark.from_range(range, nsid)
local r = range:to_charwise()
local stop = r.stop or r.start
local end_row = stop.lnum - 1
local end_col = stop.col
local end_col = r:is_empty() and (r.start.col - 1) or stop.col
if range.mode == 'V' then
end_row = end_row + 1
end_col = 0
@@ -702,7 +702,7 @@ end
function Range:to_charwise()
local r = self:clone()
r.mode = 'v'
if r.stop:is_col_max() then r.stop = r.stop:as_real() end
if r.stop and r.stop:is_col_max() then r.stop = r.stop:as_real() end
return r
end