fix: kitty graphics check

This commit is contained in:
frehml 2024-11-12 17:12:08 +01:00 committed by Tim Culverhouse
parent 6d729a2dc3
commit b20cd90246

View file

@ -735,6 +735,8 @@ pub fn transmitLocalImagePath(
medium: Image.TransmitMedium, medium: Image.TransmitMedium,
format: Image.TransmitFormat, format: Image.TransmitFormat,
) !Image { ) !Image {
if (!self.caps.kitty_graphics) return error.NoGraphicsCapability;
defer self.next_img_id += 1; defer self.next_img_id += 1;
const id = self.next_img_id; const id = self.next_img_id;
@ -788,6 +790,8 @@ pub fn transmitPreEncodedImage(
height: u16, height: u16,
format: Image.TransmitFormat, format: Image.TransmitFormat,
) !Image { ) !Image {
if (!self.caps.kitty_graphics) return error.NoGraphicsCapability;
defer self.next_img_id += 1; defer self.next_img_id += 1;
const id = self.next_img_id; const id = self.next_img_id;