summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/config.c b/config.c
index f19603a..c5f6c31 100644
--- a/config.c
+++ b/config.c
@@ -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) {