summaryrefslogtreecommitdiff
path: root/prism_compile.c
diff options
context:
space:
mode:
-rw-r--r--prism_compile.c15
1 files changed, 14 insertions, 1 deletions
@@ -10444,7 +10444,20 @@ pm_parse_errors_format(const pm_parser_t *parser, const pm_list_t *error_list, p
// Here we determine how many lines of padding to display after the
// error, depending on where the next error is in source.
last_line = error->line;
- int32_t next_line = (index == error_list->size - 1) ? (((int32_t) newline_list->size) + parser->start_line) : errors[index + 1].line;
if (next_line - last_line > 1) {
pm_buffer_append_string(buffer, " ", 2);