mirror of
https://github.com/neovim/neovim.git
synced 2026-06-17 01:01:16 +00:00
feat(vim.pos): accept buf=0 for current buf #39414
This commit is contained in:
committed by
Justin M. Keyes
parent
828a35b14f
commit
49efe692f3
@@ -22,6 +22,17 @@ describe('vim.range', function()
|
||||
eq(buf, range[5])
|
||||
end)
|
||||
|
||||
it('creates a range with buf=0', function()
|
||||
local range, buf = exec_lua(function()
|
||||
return vim.range(0, 3, 5, 4, 6), vim.api.nvim_get_current_buf()
|
||||
end)
|
||||
eq(3, range[1])
|
||||
eq(5, range[2])
|
||||
eq(4, range[3])
|
||||
eq(6, range[4])
|
||||
eq(buf, range[5])
|
||||
end)
|
||||
|
||||
it('creates a range from two positions', function()
|
||||
local range, buf1 = exec_lua(function()
|
||||
local buf = vim.api.nvim_create_buf(false, true)
|
||||
|
||||
Reference in New Issue
Block a user