Bug 138913 - Line wrapping causes GREP_COLOR background color to "smear"
Line wrapping causes GREP_COLOR background color to "smear"
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-11 17:01 EST by Eli
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 2.5.1-39
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-16 11:49:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eli 2004-11-11 17:01:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
Running bash in an xterm with
GREP_COLOR='1;37;41'
GREP_OPTIONS=--color=auto

When the highlighted portion of a line wraps and causes the screen to
scroll by a line, the background of the full line is set to red (41).

For example, in an xterm, set GREP_COLOR and GREP_OPTIONS as above,
then press enter until your prompt is on the last line of the xterm. 
Then run:
grep 'expressions containing' /usr/share/doc/grep-2.5.1/*
The 'expressions containing' will split before 'containing', and the
line after "backreferencing" will have a red background.

Version-Release number of selected component (if applicable):
grep-2.5.1-26

How reproducible:
Always

Steps to Reproduce:
1. Open bash in an xterm
2. export GREP_COLOR='1;37;41'
3. export GREP_OPTIONS='--color=auto'
4. press <ENTER> until prompt is on the last line of the xterm
5. grep 'expressions containing' /usr/share/doc/grep-2.5.1/*
    

Actual Results:  The 'expressions containing' will split before
'containing', and the line after "backreferencing" will have a red
background.

Expected Results:  The 'expressions containing' will split before
'containing', and the line after "backreferencing" will not have a red
background.

Additional info:
Comment 2 Tim Waugh 2004-11-16 08:43:25 EST
Filed upstream:
https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11022

I've applied a patch submitted by Karsten Hopp, which seems to fix the
problem here at least.

Thanks for the report.
Comment 3 Bill Nottingham 2004-11-16 11:21:41 EST
On builds of some packages with this grep installed, we're seeing
failures like:

/usr/sbin/setfiles -q -c policy.18 file_contexts/file_contexts
/usr/sbin/setfiles:  line number 2 is missing fields (only read [K)

or:

objdump:
'.[K/usr/src/build/484679-i386/install/usr/lib/valgrind/libpthread.so':
No such file
objdump:
'.[K/usr/src/build/484679-i386/install/usr/lib/valgrind/libpthread.so.0':
No such file
objdump:
'.[K/usr/src/build/484679-i386/install/usr/lib/valgrind/vg_inject.so':
No such file
Comment 4 Tim Waugh 2004-11-16 11:49:20 EST
Sorry.  Fixed in grep-2.5.1-39.

Note You need to log in before you can comment on or make changes to this bug.