Files
neovim/runtime/doc
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
..
2026-01-27 17:14:57 -05:00
2026-02-12 13:46:45 +01:00
2026-02-12 13:46:45 +01:00
2026-02-12 13:46:45 +01:00
2026-02-12 13:46:45 +01:00
2026-02-12 13:46:45 +01:00
2025-12-06 20:33:02 -05:00
2025-12-06 20:33:02 -05:00
2025-12-06 20:33:02 -05:00
2026-01-07 08:11:42 +08:00
2025-12-06 20:33:02 -05:00
2026-01-27 17:14:57 -05:00
2025-12-16 13:46:04 -05:00
2026-01-12 03:50:57 +00:00
2026-02-12 13:46:45 +01:00
2025-12-15 13:55:15 -05:00
2026-02-12 13:46:45 +01:00
2025-12-15 13:55:15 -05:00
2026-01-23 09:30:37 +01:00
2026-02-12 13:46:45 +01:00
2025-12-15 13:55:15 -05:00
2025-09-28 20:57:59 -07:00
2025-12-15 13:55:15 -05:00
2025-12-15 13:55:15 -05:00
2025-12-06 20:33:02 -05:00
2025-12-15 13:55:15 -05:00
2026-01-27 17:14:57 -05:00
2026-01-07 08:11:42 +08:00
2025-12-06 20:33:02 -05:00
2025-12-06 20:33:02 -05:00
2025-12-15 13:55:15 -05:00
2025-12-16 12:55:32 +08:00
2025-12-15 13:55:15 -05:00