Commit Graph

5 Commits

Author SHA1 Message Date
Will Hopkins
69ffbb76c2 feat(iter): add Iter.take (#26525) 2023-12-12 14:27:24 -06:00
Gregory Anders
5b40a1c09d feat(lua): implement Iter:join() (#26416) 2023-12-05 18:35:22 -08:00
Gregory Anders
2ee8ace217 fix(iter): make pipeline termination conditions consistent (#24614)
If an iterator pipeline stage returns nil as its first return value, the
other return values are ignored and it is treated as if that stage
returned only nil (the semantics of returning nil are different between
different stages). This is consistent with how for loops work in Lua
more generally, where the for loop breaks when the first return value
from the function iterator is nil (see :h for-in for details).
2023-08-09 15:41:45 -05:00
Mathias Fußenegger
302d3cfb96 feat(lua): use callable table as iterator in vim.iter (#23957)
A table passed to `vim.iter` can be a class instance with a `__call`
implementation for the iterator protocol.
2023-06-10 20:33:23 +02:00
Gregory Anders
147bb87245 test: move vim.iter tests to separate file 2023-04-24 20:31:25 -06:00