mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
fix(kitty_graphics): set dirty state on various scroll operations
This commit is contained in:
@ -540,6 +540,9 @@ pub fn cursorDownScroll(self: *Screen) !void {
|
||||
assert(self.cursor.y == self.pages.rows - 1);
|
||||
defer self.assertIntegrity();
|
||||
|
||||
// Scrolling dirties the images because it updates their placements pins.
|
||||
self.kitty_images.dirty = true;
|
||||
|
||||
// If we have no scrollback, then we shift all our rows instead.
|
||||
if (self.no_scrollback) {
|
||||
// If we have a single-row screen, we have no rows to shift
|
||||
|
@ -1075,6 +1075,9 @@ pub fn index(self: *Terminal) !void {
|
||||
self.screen.cursor.x >= self.scrolling_region.left and
|
||||
self.screen.cursor.x <= self.scrolling_region.right)
|
||||
{
|
||||
// Scrolling dirties the images because it updates their placements pins.
|
||||
self.screen.kitty_images.dirty = true;
|
||||
|
||||
// If our scrolling region is the full screen, we create scrollback.
|
||||
// Otherwise, we simply scroll the region.
|
||||
if (self.scrolling_region.top == 0 and
|
||||
@ -1391,6 +1394,9 @@ pub fn insertLines(self: *Terminal, count: usize) void {
|
||||
self.screen.cursor.x < self.scrolling_region.left or
|
||||
self.screen.cursor.x > self.scrolling_region.right) return;
|
||||
|
||||
// Scrolling dirties the images because it updates their placements pins.
|
||||
self.screen.kitty_images.dirty = true;
|
||||
|
||||
// Remaining rows from our cursor to the bottom of the scroll region.
|
||||
const rem = self.scrolling_region.bottom - self.screen.cursor.y + 1;
|
||||
|
||||
@ -1534,6 +1540,9 @@ pub fn deleteLines(self: *Terminal, count_req: usize) void {
|
||||
self.screen.cursor.x < self.scrolling_region.left or
|
||||
self.screen.cursor.x > self.scrolling_region.right) return;
|
||||
|
||||
// Scrolling dirties the images because it updates their placements pins.
|
||||
self.screen.kitty_images.dirty = true;
|
||||
|
||||
// top is just the cursor position. insertLines starts at the cursor
|
||||
// so this is our top. We want to shift lines down, down to the bottom
|
||||
// of the scroll region.
|
||||
|
Reference in New Issue
Block a user