diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-23 22:29:11 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-23 22:29:11 -0700 |
| commit | 9d0db7e2a3efaef49d7f40770f58e4919cde2711 (patch) | |
| tree | 2f39f4401b9bfac058c4e8d206a0334d60ed7b5f | |
| parent | 7e04f59554d31d063d2a5dd901184ab2e32b30d0 (diff) | |
Instead of always printing all context with -r flag, always print all
context with handling piped in input
| -rw-r--r-- | bp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -249,7 +249,7 @@ static int print_matches(FILE *out, def_t *defs, file_t *f, pat_t *pattern) } if (m) recycle_if_unused(&m); - if (matches > 0 || (options.context_before == ALL_CONTEXT && options.context_after == ALL_CONTEXT)) { + if (matches > 0 || f->filename[0] == '\0') { // Print trailing context lines: print_match(out, &pr, NULL); } |
