mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal/kitty-gfx: add error if both image id and num is set
This commit is contained in:
@ -120,6 +120,9 @@ fn transmit(
|
|||||||
.image_number = t.image_number,
|
.image_number = t.image_number,
|
||||||
.placement_id = t.placement_id,
|
.placement_id = t.placement_id,
|
||||||
};
|
};
|
||||||
|
if (t.image_id > 0 and t.image_number > 0) {
|
||||||
|
return .{ .message = "EINVAL: image ID and number are mutually exclusive" };
|
||||||
|
}
|
||||||
|
|
||||||
const load = loadAndAddImage(alloc, terminal, cmd) catch |err| {
|
const load = loadAndAddImage(alloc, terminal, cmd) catch |err| {
|
||||||
encodeError(&result, err);
|
encodeError(&result, err);
|
||||||
@ -244,6 +247,8 @@ fn delete(
|
|||||||
) Response {
|
) Response {
|
||||||
const storage = &terminal.screen.kitty_images;
|
const storage = &terminal.screen.kitty_images;
|
||||||
storage.delete(alloc, terminal, cmd.control.delete);
|
storage.delete(alloc, terminal, cmd.control.delete);
|
||||||
|
|
||||||
|
// Delete never responds on success
|
||||||
return .{};
|
return .{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user