mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
config: error out on invalid grapheme-width-method values
This commit is contained in:
parent
5b66592a57
commit
d60e303c33
1 changed files with 7 additions and 0 deletions
7
config.c
7
config.c
|
|
@ -2405,6 +2405,13 @@ parse_section_tweak(
|
||||||
conf->tweak.grapheme_width_method = GRAPHEME_WIDTH_DOUBLE;
|
conf->tweak.grapheme_width_method = GRAPHEME_WIDTH_DOUBLE;
|
||||||
else if (strcmp(value, "wcswidth") == 0)
|
else if (strcmp(value, "wcswidth") == 0)
|
||||||
conf->tweak.grapheme_width_method = GRAPHEME_WIDTH_WCSWIDTH;
|
conf->tweak.grapheme_width_method = GRAPHEME_WIDTH_WCSWIDTH;
|
||||||
|
else {
|
||||||
|
LOG_AND_NOTIFY_ERR(
|
||||||
|
"%s:%d: [tweak]: %s: invalid 'grapheme-width-method, "
|
||||||
|
"expected one of 'wcswidth' or 'double-width'",
|
||||||
|
path, lineno, value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_WARN("%s:%d [tweak]: grapheme-width-method=%s", path, lineno, value);
|
LOG_WARN("%s:%d [tweak]: grapheme-width-method=%s", path, lineno, value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue