diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index fc21b2a9..4955c94f 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -238,15 +238,18 @@ bool read_config(FILE *file, bool is_active) { | |||
238 | bool success = true; | 238 | bool success = true; |
239 | enum cmd_status block = CMD_BLOCK_END; | 239 | enum cmd_status block = CMD_BLOCK_END; |
240 | 240 | ||
241 | int line_number = 0; | ||
241 | char *line; | 242 | char *line; |
242 | while (!feof(file)) { | 243 | while (!feof(file)) { |
243 | line = read_line(file); | 244 | line = read_line(file); |
245 | line_number++; | ||
244 | line = strip_comments(line); | 246 | line = strip_comments(line); |
245 | struct cmd_results *res = config_command(line); | 247 | struct cmd_results *res = config_command(line); |
246 | switch(res->status) { | 248 | switch(res->status) { |
247 | case CMD_FAILURE: | 249 | case CMD_FAILURE: |
248 | case CMD_INVALID: | 250 | case CMD_INVALID: |
249 | sway_log(L_ERROR, "Error on line '%s': %s", line, res->error); | 251 | sway_log(L_ERROR, "Error on line %i '%s': %s", line_number, line, |
252 | res->error); | ||
250 | success = false; | 253 | success = false; |
251 | break; | 254 | break; |
252 | 255 | ||