mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
Add a regression test that exercises the code path which crashed in v0.46.2 (#10017): when paused_rendering is active and a selection extends into the scrollback, the inner loop of apply_selection iterates with a negative y. Without the recently-added paused_y translation and the paused_y < 0 guard, the call to linebuf_init_line treats the negative y as a huge unsigned index_type and reads ~4GB out of bounds in line_attrs[idx], crashing with SIGBUS. The test reproduces the trigger deterministically via the Screen Python bindings and asserts that current_selections() returns the expected buffer instead of crashing.