Fixed double line numbering

This commit is contained in:
Bruce Hill 2021-09-24 23:00:40 -07:00
parent 6c612d4def
commit 1b777a569e

2
bp.c
View File

@ -343,8 +343,6 @@ static int print_matches(FILE *out, def_t *defs, file_t *f, pat_t *pattern)
}
fprint_context_between(out, prev, m->start);
if (print_opts.normal_color) fprintf(out, "%s", print_opts.normal_color);
if (m->start == f->start || m->start[-1] == '\n')
fprint_linenum(out, f, (int)get_line_number(f, m->start), print_opts.normal_color);
fprint_match(out, f->start, m, &print_opts);
if (print_opts.normal_color) fprintf(out, "%s", print_opts.normal_color);
prev = m->end;