diff --git a/CHANGELOG.md b/CHANGELOG.md index c4abf4671..75e16b7c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Features: Bugfixes: * Fix unitialized variables (#609) +* Fix spelling of `--preserve-aspect-ratio` (#614) Logos: diff --git a/doc/json_schema.json b/doc/json_schema.json index 87257ab27..886823d5a 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -156,7 +156,7 @@ "description": "Whether to print the remaining logo, if it has more lines than modules to display", "default": false }, - "preserveAspectRadio": { + "preserveAspectRatio": { "type": "boolean", "description": "Whether to preserve the aspect ratio of the logo. Supported by iTerm image protocol", "default": false diff --git a/src/data/help.txt b/src/data/help.txt index 9a75bd4a3..27f29d6a3 100644 --- a/src/data/help.txt +++ b/src/data/help.txt @@ -35,7 +35,7 @@ Logo options: --logo-type : Set the type of the logo given; must be auto, builtin, file, file-raw, data, data-raw, sixel, kitty, iterm or chafa --logo-width : Set the width of the logo (in characters), if it is an image. Required for iTerm image protocol --logo-height : Set the height of the logo (in characters), if it is an image. Required for iTerm image protocol - --logo-preserve-aspect-radio : Set if the logo should fill the specified width and height as much as possible without stretching. Supported by iTerm image protocol + --logo-preserve-aspect-ratio : Set if the logo should fill the specified width and height as much as possible without stretching. Supported by iTerm image protocol --logo-color-[1-9] : Overwrite a color in the logo --logo-padding : Set the padding on the left and the right of the logo --logo-padding-left : Set the padding on the left of the logo diff --git a/src/logo/image/image.c b/src/logo/image/image.c index 6164585f5..ac5d405b4 100644 --- a/src/logo/image/image.c +++ b/src/logo/image/image.c @@ -95,7 +95,7 @@ static bool printImageIterm(void) ffStrbufAppendF(&buf, "\e]1337;File=inline=1;width=%u;height=%u;preserveAspectRatio=%u:%s\a\n", (unsigned) options->width, (unsigned) options->height, - (unsigned) options->preserveAspectRadio, + (unsigned) options->preserveAspectRatio, base64.chars ); diff --git a/src/options/logo.c b/src/options/logo.c index 1d305e3b9..0e78bf0c1 100644 --- a/src/options/logo.c +++ b/src/options/logo.c @@ -15,7 +15,7 @@ void ffOptionsInitLogo(FFOptionsLogo* options) options->paddingLeft = 0; options->paddingRight = 4; options->printRemaining = true; - options->preserveAspectRadio = false; + options->preserveAspectRatio = false; options->recache = false; options->separate = false; @@ -113,8 +113,8 @@ logoType: options->paddingRight = ffOptionParseUInt32(key, value); else if(strcasecmp(subKey, "print-remaining") == 0) options->printRemaining = ffOptionParseBoolean(value); - else if(strcasecmp(subKey, "preserve-aspect-radio") == 0) - options->preserveAspectRadio = ffOptionParseBoolean(value); + else if(strcasecmp(subKey, "preserve-aspect-ratio") == 0) + options->preserveAspectRatio = ffOptionParseBoolean(value); else if(strcasecmp(subKey, "recache") == 0) options->recache = ffOptionParseBoolean(value); else if(strcasecmp(subKey, "separate") == 0) @@ -327,9 +327,9 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo options->printRemaining = yyjson_get_bool(val); continue; } - else if (strcasecmp(key, "preserveAspectRadio") == 0) + else if (strcasecmp(key, "preserveAspectRatio") == 0) { - options->preserveAspectRadio = yyjson_get_bool(val); + options->preserveAspectRatio = yyjson_get_bool(val); continue; } else if (strcasecmp(key, "recache") == 0) @@ -504,8 +504,8 @@ void ffOptionsGenerateLogoJsonConfig(FFOptionsLogo* options, yyjson_mut_doc* doc if (options->printRemaining != defaultOptions.printRemaining) yyjson_mut_obj_add_bool(doc, obj, "printRemaining", options->printRemaining); - if (options->preserveAspectRadio != defaultOptions.preserveAspectRadio) - yyjson_mut_obj_add_bool(doc, obj, "preserveAspectRadio", options->preserveAspectRadio); + if (options->preserveAspectRatio != defaultOptions.preserveAspectRatio) + yyjson_mut_obj_add_bool(doc, obj, "preserveAspectRatio", options->preserveAspectRatio); if (options->recache != defaultOptions.recache) yyjson_mut_obj_add_bool(doc, obj, "recache", options->recache); diff --git a/src/options/logo.h b/src/options/logo.h index dd370471e..c5bb6fb3e 100644 --- a/src/options/logo.h +++ b/src/options/logo.h @@ -34,7 +34,7 @@ typedef struct FFOptionsLogo uint32_t paddingLeft; uint32_t paddingRight; bool printRemaining; - bool preserveAspectRadio; + bool preserveAspectRatio; bool recache; bool separate;