Subject: [patch #3801] Red Hat's "color" patch

Follow-up Comment #1, patch #3801 (project grep):

Summary: if grep's output causes the terminal to scroll while grep is
printing text with a different background colour, the terminal fills the new
line with that background colour and then grep may not fill the whole line
with new text, so the end of the line remains the wrong colour.

This patch attempts to print a "clear to end of line" control sequence after
the output, which gives the desired effect in this case. I'm not completely
sure that this is the right thing to do anyway, though it may be and I can't
think of anything better.

However, the current version of the patch appears to miss the "only_matching"
and "match_icase" cases.


Reply to this item at: