graphics: images inside a partial scroll region do not scroll with the text #40

Closed
opened 2026-10-07 00:12:24 +09:00 by natsukium · 0 comments
Owner

When a program sets a scroll region narrower than the screen (DECSTBM, e.g. a fixed header and footer with the rows in between scrolling) and text scrolls inside it, Kitty graphics placements inside the region stay where they are. The text moves up under or over a stationary image.

Placements move only on full-screen scrolls: into scrollback on the primary screen, and off the top on the alternate screen. A scroll of a partial region queues no placement effect.

Repro: printf '\033[2;10r\033[5;1H', place an image with a=T (e.g. c=8,r=3), then print enough lines to scroll the region. The image stays on rows 5–7 while the text scrolls past it.

kitty: graphics.c scroll_filter_margins_func moves every non-virtual placement that lies within the region by the scroll amount. If the move takes a placement partly past a margin, kitty clips its source rect; if it moves fully outside, kitty drops it.

The cursor move after an image placement uses the same region scroll, so an image placed at the bottom margin of a partial region has the same limitation.

Decide: whether to follow kitty's per-region move and clip. Clipping needs a placement source-rect adjustment that the daemon does not do today.

When a program sets a scroll region narrower than the screen (DECSTBM, e.g. a fixed header and footer with the rows in between scrolling) and text scrolls inside it, Kitty graphics placements inside the region stay where they are. The text moves up under or over a stationary image. Placements move only on full-screen scrolls: into scrollback on the primary screen, and off the top on the alternate screen. A scroll of a partial region queues no placement effect. **Repro:** `printf '\033[2;10r\033[5;1H'`, place an image with `a=T` (e.g. `c=8,r=3`), then print enough lines to scroll the region. The image stays on rows 5–7 while the text scrolls past it. **kitty:** `graphics.c` `scroll_filter_margins_func` moves every non-virtual placement that lies within the region by the scroll amount. If the move takes a placement partly past a margin, kitty clips its source rect; if it moves fully outside, kitty drops it. The cursor move after an image placement uses the same region scroll, so an image placed at the bottom margin of a partial region has the same limitation. **Decide:** whether to follow kitty's per-region move and clip. Clipping needs a placement source-rect adjustment that the daemon does not do today.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis#40
No description provided.