Fix line numbers - commands are added after the line ends so they need to

get line - 1.
This commit is contained in:
nicm
2019-05-23 18:39:00 +00:00
parent 6c260af56d
commit f3e01ecc42
2 changed files with 3 additions and 2 deletions

1
cfg.c
View File

@ -126,6 +126,7 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags,
memset(&pi, 0, sizeof pi);
pi.flags = flags;
pi.file = path;
pi.line = 1;
pr = cmd_parse_from_file(f, &pi);
fclose(f);