From a69f71feaaf67d519f7ee75545ee73c1eb1843a5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 23 Dec 2013 12:33:12 -0800 Subject: [PATCH] maint: fix/improve a comment * src/main.c (prline): Replace untrue FIXME comment with one telling how the hard-to-reach code can be exercised. --- src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 1dfbcb6..a7487df 100644 --- a/src/main.c +++ b/src/main.c @@ -937,9 +937,12 @@ prline (char const *beg, char const *lim, int sep) if (matching && (only_matching || *match_color)) beg = print_line_middle (beg, lim, line_color, match_color); - /* FIXME: this test may be removable. */ if (!only_matching && *line_color) - beg = print_line_tail (beg, lim, line_color); + { + /* This code is exercised at least when grep is invoked like this: + echo k| GREP_COLORS='sl=01;32' src/grep k --color=always */ + beg = print_line_tail (beg, lim, line_color); + } } if (!only_matching && lim > beg) -- 1.8.5.rc2.6.gc6f1b92