aboutsummaryrefslogtreecommitdiff
path: root/src/grab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grab.c')
-rw-r--r--src/grab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grab.c b/src/grab.c
index bc86b8d..f0d9946 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -477,7 +477,7 @@ putm(struct sv sv, regmatch_t *rm, const char *filename)
} else
printf("%s%c", filename, sep);
}
- if (rm) {
+ if (cflag && rm) {
fwrite(sv.p, 1, rm->rm_so, stdout);
printf("\33[%sm%.*s\33[0m", ma, (int)(rm->rm_eo - rm->rm_so),
sv.p + rm->rm_so);