fix(lua): vim.region on linewise selection #25467

fixes #18155
This commit is contained in:
Aayush Ojha
2023-10-06 05:44:50 -07:00
committed by GitHub
parent 01374446af
commit 5db076c7cc
2 changed files with 11 additions and 0 deletions

View File

@@ -2401,6 +2401,14 @@ describe('lua stdlib', function()
insert([[αα]])
eq({0,5}, exec_lua[[ return vim.region(0,{0,0},{0,4},'3',true)[0] ]])
end)
it('linewise', function()
insert(dedent( [[
text tααt tααt text
text tαxt txtα tex
text tαxt tαxt
]]))
eq({0,-1}, exec_lua[[ return vim.region(0,{1,5},{1,14},'V',true)[1] ]])
end)
it('getpos() input', function()
insert('getpos')
eq({0,6}, exec_lua[[ return vim.region(0,{0,0},'.','v',true)[0] ]])