Fix segfault in reset with Kitty graphics images on screen (#5693)

Fixes #5649
pull/5529/head
Mitchell Hashimoto 2025-02-11 11:26:06 -08:00 committed by GitHub
commit d1614f6bc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 6 deletions

View File

@ -278,12 +278,9 @@ pub fn reset(self: *Screen) void {
.page_cell = cursor_rac.cell,
};
// Clear kitty graphics
self.kitty_images.delete(
self.alloc,
undefined, // All image deletion doesn't need the terminal
.{ .all = true },
);
// Reset kitty graphics storage
self.kitty_images.deinit(self.alloc, self);
self.kitty_images = .{ .dirty = true };
// Reset our basic state
self.saved_cursor = null;