mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
terminal/kitty-gfx: handle quiet settings for response
This commit is contained in:
@ -24,10 +24,22 @@ pub fn execute(
|
|||||||
) ?Response {
|
) ?Response {
|
||||||
_ = terminal;
|
_ = terminal;
|
||||||
_ = buf;
|
_ = buf;
|
||||||
switch (cmd.control) {
|
|
||||||
.query => return query(alloc, cmd),
|
const resp_: ?Response = switch (cmd.control) {
|
||||||
else => return .{ .message = "ERROR: unimplemented action" },
|
.query => query(alloc, cmd),
|
||||||
|
else => .{ .message = "ERROR: unimplemented action" },
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle the quiet settings
|
||||||
|
if (resp_) |resp| {
|
||||||
|
return switch (cmd.quiet) {
|
||||||
|
.no => resp,
|
||||||
|
.ok => if (resp.ok()) null else resp,
|
||||||
|
.failures => null,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Execute a "query" command.
|
/// Execute a "query" command.
|
||||||
|
Reference in New Issue
Block a user