Files
neovim/test/functional/lua
Elijah Koulaxis 8a0cbf04d6 feat(iter): peek(), skip(predicate) for non-list iterators #37604
Problem:
Iter:peek() only works if the iterator is a |list-iterator| (internally, an `ArrayIter`).
However, it is possible to implement :peek() support for any iterator.

Solution:
- add `_peeked` buffer for lookahead without actually consuming values
- `peek()` now works for function, pairs(), and array iterators
- `skip(predicate)` stops at the first non matching element without consuming it
- keep existing optimized behavior for `ArrayIter` to maintain backward compatibility
- use `pack`/`unpack` to support iterators that return multiple values
2026-02-12 11:55:16 -05:00
..
2024-04-23 18:17:04 +02:00
2026-02-12 13:46:45 +01:00
2025-01-09 09:26:45 -08:00
2025-09-03 23:03:51 -04:00
2025-11-22 17:04:32 -05:00
2024-04-23 18:17:04 +02:00
2026-02-12 13:46:45 +01:00
2026-01-12 03:50:57 +00:00