mirror of
https://github.com/neovim/neovim.git
synced 2026-08-01 13:19:20 +00:00
Problem:
Tree-sitter uses UINT32_MAX for full-document ranges, which becomes -1 on 32-bit platforms and reaches _foldupdate as an invalid end row.
Solution:
Treat negative changed-range end rows as unbounded and clamp them to the buffer line count. Add a regression test that simulates the 32-bit sentinel.
AI-assisted: Codex
(cherry picked from commit 20ff82d9fc)