bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a fix for color ls with wrapped lines.


From: Jim Meyering
Subject: Re: a fix for color ls with wrapped lines.
Date: Tue, 14 Oct 2008 16:17:07 +0200

"Alexander V. Lukyanov" <address@hidden> wrote:
> Hello, bug-coreutils!
>
> There is a problem with color ls when a background color is used and the line
> wraps. It leads to complete new line erased with the background on "bce" 
> terminals.
> (One may argue that rxvt behaves differently, but there are many other bce 
> terminals)
>
> One fix is to clear to end-of-line after turning off the color. Here is a 
> patch
> that does it.
>
> --- ls.c.1    2008-10-14 12:24:39.605050000 +0400
> +++ ls.c      2008-10-14 12:25:48.985396400 +0400
> @@ -538,7 +538,7 @@
>    {
>      { LEN_STR_PAIR ("\033[") },              /* lc: Left of color sequence */
>      { LEN_STR_PAIR ("m") },          /* rc: Right of color sequence */
> -    { 0, NULL },                     /* ec: End color (replaces lc+no+rc) */
> +    { LEN_STR_PAIR ("\033[m\033[K") },       /* ec: End color (replaces 
> lc+no+rc) */
>      { LEN_STR_PAIR ("0") },          /* rs: Reset to ordinary colors */
>      { 0, NULL },                     /* no: Normal */
>      { 0, NULL },                     /* fi: File: default */

Thanks for the report.
Can you list a few terminal emulators that are affected?
The more the better.

Also, please tell precisely how to demonstrate the problem.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]