From 833d4d167b456efce3697ceac372a3f9c528a463 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Sat, 14 May 2005 05:26:48 +0000 Subject: [PATCH] Fix background colour problems with --color output (RH bug #138913). Obtained from: Karsten Hopp via Fedora --- gnu/usr.bin/grep/grep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c index 1cd8b34db9fe..b339f1d319b6 100644 --- a/gnu/usr.bin/grep/grep.c +++ b/gnu/usr.bin/grep/grep.c @@ -674,6 +674,7 @@ prline (char const *beg, char const *lim, int sep) fputs ("\33[00m", stdout); beg = b + match_size; } + fputs ("\33[K", stdout); } fwrite (beg, 1, lim - beg, stdout); if (ferror (stdout))