feat(lua): support vim.Range:has(vim.pos) #37879

This commit is contained in:
Maria Solano
2026-02-16 08:05:38 -08:00
committed by GitHub
parent 501a21f333
commit 6e1745e96e
3 changed files with 25 additions and 9 deletions

View File

@@ -82,4 +82,13 @@ describe('vim.range', function()
end_ = { row = 0, col = 36, buf = buf },
}, range)
end)
it('checks whether a range contains a position', function()
eq(
true,
exec_lua(function()
return vim.range(0, 0, 1, 5):has(vim.pos(0, 1))
end)
)
end)
end)