Skip to content

Commit 4355163

Browse files
committed
Logo (Image): better Windows support
1 parent 6473524 commit 4355163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/logo/image/image.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static bool printImageIterm(bool printError)
8383
fprintf(stderr, "\nLogo (iterm): fail to query cursor position: %s\n", error);
8484
return true; // We already printed image logo, don't print ascii logo then
8585
}
86+
if (X < options->paddingLeft + options->width)
87+
X = (uint16_t) (options->paddingLeft + options->width);
8688
if (options->position == FF_LOGO_POSITION_LEFT)
8789
instance.state.logoWidth = X + options->paddingRight - 1;
8890
instance.state.logoHeight = Y;
@@ -207,6 +209,8 @@ static bool printImageKittyDirect(bool printError)
207209
fprintf(stderr, "\nLogo (kitty-direct): fail to query cursor position: %s\n", error);
208210
return true; // We already printed image logo, don't print ascii logo then
209211
}
212+
if (X < options->paddingLeft + options->width)
213+
X = (uint16_t) (options->paddingLeft + options->width);
210214
if (options->position == FF_LOGO_POSITION_LEFT)
211215
instance.state.logoWidth = X + options->paddingRight - 1;
212216
instance.state.logoHeight = Y;

0 commit comments

Comments
 (0)