terminal/kitty-gfx: hook up delete

This commit is contained in:
Mitchell Hashimoto
2023-08-23 11:37:14 -07:00
parent 81498fe9be
commit de3ef0f78c

View File

@ -39,8 +39,8 @@ pub fn execute(
.transmit => transmit(alloc, terminal, cmd),
.transmit_and_display => transmitAndDisplay(alloc, terminal, cmd),
.display => display(alloc, terminal, cmd),
.delete => delete(alloc, terminal, cmd),
.delete,
.transmit_animation_frame,
.control_animation,
.compose_animation,
@ -225,6 +225,17 @@ fn transmitAndDisplay(
return display(alloc, terminal, cmd);
}
/// Display a previously transmitted image.
fn delete(
alloc: Allocator,
terminal: *Terminal,
cmd: *Command,
) Response {
const storage = &terminal.screen.kitty_images;
storage.delete(alloc, terminal, cmd.control.delete);
return .{};
}
fn loadAndAddImage(
alloc: Allocator,
terminal: *Terminal,