aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-23 12:42:57 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-23 12:42:57 -0700
commit2f9b0ce941b0cdb6b332e4ef510fda07e8201801 (patch)
treeb6e84598d5c8aee6f5c605c4011283bb40797567
parent07c628471c1b37f125e3766f0e95089168603b87 (diff)
Always print file when context is ALL
-rw-r--r--bp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bp.c b/bp.c
index 689432c..f626628 100644
--- a/bp.c
+++ b/bp.c
@@ -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) {
+ if (matches > 0 || (options.context_before == ALL_CONTEXT && options.context_after == ALL_CONTEXT)) {
// Print trailing context lines:
print_match(out, &pr, NULL);
}