diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-29 16:55:38 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-29 16:55:38 -0800 |
| commit | 906b03609b82a19dae4a2a98ead71c2a9a8cb706 (patch) | |
| tree | 95331fca711aab02d02dae13b1424a38f8a9143f /print.c | |
| parent | 51d5872c7104a01ff57615e7dc98db10e599fe1f (diff) | |
Fixed bug with adding accidental extra newlines
Diffstat (limited to 'print.c')
| -rw-r--r-- | print.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -395,7 +395,7 @@ void print_match(FILE *out, printer_t *pr, match_t *m) const char *after_last = context_after(pr, pr->pos); print_between(out, pr, pr->pos, after_last, pr->use_color ? color_normal : NULL); // Guarantee trailing newline - if (pr->pos > pr->file->contents && pr->pos[-1] != '\n') fprintf(out, "\n"); + if (!pr->needs_line_number) fprintf(out, "\n"); } if (pr->use_color) fprintf(out, "%s", color_normal); } |
