termio: clear kitty images when deleting above the cursor

This commit is contained in:
moni
2024-12-06 09:44:20 +08:00
committed by Mitchell Hashimoto
parent 2fb92dd4aa
commit 250bd35830

View File

@ -478,6 +478,18 @@ pub fn clearScreen(self: *Termio, td: *ThreadData, history: bool) !void {
); );
} }
// Clear all Kitty graphics state for this screen. This copies
// Kitty's behavior when Cmd+K deletes all Kitty graphics. I
// didn't spend time researching whether it only deletes Kitty
// graphics that are placed baove the cursor or if it deletes
// all of them. We delete all of them for now but if this behavior
// isn't fully correct we should fix this later.
self.terminal.screen.kitty_images.delete(
self.terminal.screen.alloc,
&self.terminal,
.{ .all = true },
);
return; return;
} }