[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15444: Bug#456943: (no subject)
From: |
Vincent Lefevre |
Subject: |
bug#15444: Bug#456943: (no subject) |
Date: |
Mon, 25 Mar 2024 15:49:52 +0100 |
User-agent: |
Mutt/2.2.12+69 (354c5b11) vl-149028 (2023-12-10) |
On 2016-07-14 14:22:15 -0700, Vincent Lefevre wrote:
> On 2016-07-14 09:02:48 +0200, Walter Doekes wrote:
> > Leon Meier wrote:
> > > As of today, the test case [...] still fails in (u)xterm.
> > > Any resolution in sight?
> >
> > I tried to reproduce, and indeed, it fails on xterm (without the 'ne' grep
> > option), but not in gnome-terminal.
> >
> > Does that mean that this is an xterm bug again and not a grep bug?
>
> It is GNOME Terminal that is buggy, so that the grep bug is not
> visible.
A solution for "grep" would be to add a space+backspace before the
escape sequence.
Testcase:
for i in `seq 5` ; do printf "%0$(($(tput cols)+i-5))dab \bc\n" ; done | \
GREP_COLORS="mt=41;97:ne" grep --color c
This works fine in Xterm, giving on a 80-column terminal:
0000000000000000000000000000000000000000000000000000000000000000000000000000abc
00000000000000000000000000000000000000000000000000000000000000000000000000000abc
000000000000000000000000000000000000000000000000000000000000000000000000000000abc
0000000000000000000000000000000000000000000000000000000000000000000000000000000abc
00000000000000000000000000000000000000000000000000000000000000000000000000000000abc
where only the "c" has the red background.
However, this triggers the bug in GNOME Terminal (and other
libvte-based terminals):
0000000000000000000000000000000000000000000000000000000000000000000000000000abc
00000000000000000000000000000000000000000000000000000000000000000000000000000ac
000000000000000000000000000000000000000000000000000000000000000000000000000000abc
0000000000000000000000000000000000000000000000000000000000000000000000000000000abc
00000000000000000000000000000000000000000000000000000000000000000000000000000000abc
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
- bug#15444: Bug#456943: (no subject),
Vincent Lefevre <=