diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-21 00:51:59 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-21 00:51:59 +0100 |
commit | 9657148ff2127c2af5c8b5c2b7eb4d5ec53c4e4e (patch) | |
tree | acf9af82b450b504928eaf3a77e70868c1306bd8 | |
parent | af4c619575b3ab268d90fdff4eabf8a5f4da1db6 (diff) |
Only highlight matches when cflag is set
-rw-r--r-- | src/grab.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |