mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
terminal/kitty: do not render blank virtual placement cells
This commit is contained in:
@ -1694,6 +1694,9 @@ fn prepKittyVirtualPlacement(
|
||||
return;
|
||||
};
|
||||
|
||||
// If our placement is zero sized then we don't do anything.
|
||||
if (rp.dest_width == 0 or rp.dest_height == 0) return;
|
||||
|
||||
const viewport: terminal.point.Point = t.screen.pages.pointFromPin(
|
||||
.viewport,
|
||||
rp.top_left,
|
||||
|
@ -293,6 +293,13 @@ pub const Placement = struct {
|
||||
width = img_scale_source.width * p_scale.x_scale;
|
||||
}
|
||||
|
||||
// If our modified source width/height is less than zero then
|
||||
// we render nothing because it means we're rendering outside
|
||||
// of the visible image.
|
||||
if (img_scale_source.width <= 0 or img_scale_source.height <= 0) {
|
||||
return .{ .top_left = self.pin };
|
||||
}
|
||||
|
||||
break :dest .{
|
||||
.x_offset = x_offset * p_scale.x_scale,
|
||||
.y_offset = y_offset * p_scale.y_scale,
|
||||
|
Reference in New Issue
Block a user