diff options
author | pommicket <pommicket@gmail.com> | 2023-03-02 09:53:11 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-02 09:53:11 -0500 |
commit | 595cc50b7985ec67c49c6e2ffc649cb04692a318 (patch) | |
tree | 970ab71aadabc9f0f0a7a1634512c31aedd23188 /config.c | |
parent | 6d9ebc8332b6cc54ada4bc17689e4de4040892c6 (diff) |
dynamic language registration working
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -834,6 +834,10 @@ static void config_parse_line(ConfigReader *cfg, Settings **applicable_settings, char *p = exts; while (*p) { + while (*p == ',') + ++p; + if (*p == '\0') + break; size_t len = strcspn(p, ","); LanguageExtension *ext = arr_addp(settings->language_extensions); ext->language = lang; @@ -1029,7 +1033,8 @@ void config_parse(Ted *ted, ConfigPart **pparts) { arr_free(languages); arr_foreach_ptr(parts, ConfigPart, part) { - + cfg->filename = part->file; + cfg->line_number = part->line; arr_add(part->text, '\0'); // null termination char *line = part->text; while (*line) { |