mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal/kitty-gfx: do not send response on transmit/display unless I
This commit is contained in:
@ -146,6 +146,10 @@ fn transmit(
|
||||
// After the image is added, set the ID in case it changed
|
||||
result.id = load.image.id;
|
||||
|
||||
// If the original request had an image number, then we respond.
|
||||
// Otherwise, we don't respond.
|
||||
if (load.image.number == 0) return .{};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -228,7 +232,8 @@ fn display(
|
||||
},
|
||||
}
|
||||
|
||||
return result;
|
||||
// Display does not result in a response on success
|
||||
return .{};
|
||||
}
|
||||
|
||||
/// Display a previously transmitted image.
|
||||
|
@ -1115,7 +1115,7 @@ const StreamHandler = struct {
|
||||
try resp.encode(buf_stream.writer());
|
||||
const final = buf_stream.getWritten();
|
||||
if (final.len > 2) {
|
||||
//log.warn("kitty graphics response: {s}", .{final[1 .. final.len - 1]});
|
||||
// log.warn("kitty graphics response: {s}", .{std.fmt.fmtSliceHexLower(final)});
|
||||
self.messageWriter(try termio.Message.writeReq(self.alloc, final));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user