summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/grep/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index 0a3706f..15b2da7 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -336,7 +336,7 @@ procline(struct str *l, int nottext)
}
/* One pass if we are not recording matches */
- if ((color == NULL && !oflag) || qflag || lflag)
+ if (!wflag && ((color == NULL && !oflag) || qflag || lflag))
break;
if (st == (size_t)pmatch.rm_so)
OpenPOWER on IntegriCloud