Skip to content

Commit aae66aa

Browse files
committed
Logo (Image): fix spelling of --preserve-aspect-ratio
Fix #614
1 parent a95b601 commit aae66aa

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Features:
1010

1111
Bugfixes:
1212
* Fix unitialized variables (#609)
13+
* Fix spelling of `--preserve-aspect-ratio` (#614)
1314

1415
Logos:
1516

doc/json_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"description": "Whether to print the remaining logo, if it has more lines than modules to display",
157157
"default": false
158158
},
159-
"preserveAspectRadio": {
159+
"preserveAspectRatio": {
160160
"type": "boolean",
161161
"description": "Whether to preserve the aspect ratio of the logo. Supported by iTerm image protocol",
162162
"default": false

src/data/help.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Logo options:
3535
--logo-type <type>: Set the type of the logo given; must be auto, builtin, file, file-raw, data, data-raw, sixel, kitty, iterm or chafa
3636
--logo-width <width>: Set the width of the logo (in characters), if it is an image. Required for iTerm image protocol
3737
--logo-height <height>: Set the height of the logo (in characters), if it is an image. Required for iTerm image protocol
38-
--logo-preserve-aspect-radio <?value>: Set if the logo should fill the specified width and height as much as possible without stretching. Supported by iTerm image protocol
38+
--logo-preserve-aspect-ratio <?value>: Set if the logo should fill the specified width and height as much as possible without stretching. Supported by iTerm image protocol
3939
--logo-color-[1-9] <color>: Overwrite a color in the logo
4040
--logo-padding <padding>: Set the padding on the left and the right of the logo
4141
--logo-padding-left <padding>: Set the padding on the left of the logo

src/logo/image/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static bool printImageIterm(void)
9595
ffStrbufAppendF(&buf, "\e]1337;File=inline=1;width=%u;height=%u;preserveAspectRatio=%u:%s\a\n",
9696
(unsigned) options->width,
9797
(unsigned) options->height,
98-
(unsigned) options->preserveAspectRadio,
98+
(unsigned) options->preserveAspectRatio,
9999
base64.chars
100100
);
101101

src/options/logo.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void ffOptionsInitLogo(FFOptionsLogo* options)
1515
options->paddingLeft = 0;
1616
options->paddingRight = 4;
1717
options->printRemaining = true;
18-
options->preserveAspectRadio = false;
18+
options->preserveAspectRatio = false;
1919
options->recache = false;
2020
options->separate = false;
2121

@@ -113,8 +113,8 @@ bool ffOptionsParseLogoCommandLine(FFOptionsLogo* options, const char* key, cons
113113
options->paddingRight = ffOptionParseUInt32(key, value);
114114
else if(strcasecmp(subKey, "print-remaining") == 0)
115115
options->printRemaining = ffOptionParseBoolean(value);
116-
else if(strcasecmp(subKey, "preserve-aspect-radio") == 0)
117-
options->preserveAspectRadio = ffOptionParseBoolean(value);
116+
else if(strcasecmp(subKey, "preserve-aspect-ratio") == 0)
117+
options->preserveAspectRatio = ffOptionParseBoolean(value);
118118
else if(strcasecmp(subKey, "recache") == 0)
119119
options->recache = ffOptionParseBoolean(value);
120120
else if(strcasecmp(subKey, "separate") == 0)
@@ -327,9 +327,9 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo
327327
options->printRemaining = yyjson_get_bool(val);
328328
continue;
329329
}
330-
else if (strcasecmp(key, "preserveAspectRadio") == 0)
330+
else if (strcasecmp(key, "preserveAspectRatio") == 0)
331331
{
332-
options->preserveAspectRadio = yyjson_get_bool(val);
332+
options->preserveAspectRatio = yyjson_get_bool(val);
333333
continue;
334334
}
335335
else if (strcasecmp(key, "recache") == 0)
@@ -504,8 +504,8 @@ void ffOptionsGenerateLogoJsonConfig(FFOptionsLogo* options, yyjson_mut_doc* doc
504504
if (options->printRemaining != defaultOptions.printRemaining)
505505
yyjson_mut_obj_add_bool(doc, obj, "printRemaining", options->printRemaining);
506506

507-
if (options->preserveAspectRadio != defaultOptions.preserveAspectRadio)
508-
yyjson_mut_obj_add_bool(doc, obj, "preserveAspectRadio", options->preserveAspectRadio);
507+
if (options->preserveAspectRatio != defaultOptions.preserveAspectRatio)
508+
yyjson_mut_obj_add_bool(doc, obj, "preserveAspectRatio", options->preserveAspectRatio);
509509

510510
if (options->recache != defaultOptions.recache)
511511
yyjson_mut_obj_add_bool(doc, obj, "recache", options->recache);

src/options/logo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct FFOptionsLogo
3434
uint32_t paddingLeft;
3535
uint32_t paddingRight;
3636
bool printRemaining;
37-
bool preserveAspectRadio;
37+
bool preserveAspectRatio;
3838
bool recache;
3939
bool separate;
4040

0 commit comments

Comments
 (0)