diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-10-21 14:17:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-10-21 14:17:41 +0000 |
| commit | d60e303c33f6719068546da910e877df1b506c2d (patch) | |
| tree | eb03afd8fa2893f4a1379e9194f937e5ea190701 /config.c | |
| parent | render: tab -> spaces (diff) | |
config: error out on invalid grapheme-width-method values
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2405,6 +2405,13 @@ parse_section_tweak( conf->tweak.grapheme_width_method = GRAPHEME_WIDTH_DOUBLE; else if (strcmp(value, "wcswidth") == 0) 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); } |
