mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 02:17:09 +10:00
fix(vim.iter): use correct cmp function when truncating tail in take (#27998)
This commit is contained in:
@@ -247,6 +247,12 @@ describe('vim.iter', function()
|
||||
eq({ 4, 3, 2, 1 }, vim.iter(t):take(5):totable())
|
||||
end
|
||||
|
||||
do
|
||||
local t = { 4, 3, 2, 1 }
|
||||
eq({ 1, 2, 3 }, vim.iter(t):rev():take(3):totable())
|
||||
eq({ 2, 3, 4 }, vim.iter(t):take(3):rev():totable())
|
||||
end
|
||||
|
||||
do
|
||||
local t = { 4, 3, 2, 1 }
|
||||
local it = vim.iter(t)
|
||||
|
||||
Reference in New Issue
Block a user