diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-23 22:33:58 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-23 22:33:58 -0700 |
| commit | 5eda0d4b881e252937e7ff44fa9876418e7684bb (patch) | |
| tree | bd342e094bdde058f980f41aa28afbff1778d5bf /bp.c | |
| parent | 9d0db7e2a3efaef49d7f40770f58e4919cde2711 (diff) | |
Only print all input if input is stdin *and* context is ALL
Diffstat (limited to 'bp.c')
| -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 || f->filename[0] == '\0') { + if (matches > 0 || (f->filename[0] == '\0' && options.context_before == ALL_CONTEXT)) { // Print trailing context lines: print_match(out, &pr, NULL); } |
