GNU bug report logs - #31105
[PATCH] Restart and reset ANSI escapes on each line for compatibility with less -R

Previous Next

Package: diffutils;

Reported by: "Dennis Lambe Jr." <malsyned <at> malsyned.net>

Date: Mon, 9 Apr 2018 08:04:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#31105: closed ([PATCH] Restart and reset ANSI escapes on each
 line for compatibility with less -R)
Date: Mon, 31 Dec 2018 06:26:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 30 Dec 2018 22:25:35 -0800
with message-id <CA+8g5KEOUt8GqdzRCM2-mQ-7nk2YngmJE4pNJ7TPbrOJZXW=xg <at> mail.gmail.com>
and subject line Re: [bug-diffutils] bug#31105: bug#31105: [PATCH] Restart and reset ANSI escapes on each line for compatibility with less -R
has caused the debbugs.gnu.org bug report #31105,
regarding [PATCH] Restart and reset ANSI escapes on each line for compatibility with less -R
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
31105: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31105
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Dennis Lambe Jr." <malsyned <at> malsyned.net>
To: bug-diffutils <at> gnu.org
Subject: [PATCH] Restart and reset ANSI escapes on each line for
 compatibility with less -R
Date: Sun, 08 Apr 2018 19:59:31 -0400
[Message part 3 (text/plain, inline)]
Hello!

GNU less can display ANSI-colored text with the -R flag, but this  
support has some limitations. One of them is that if an escape  
sequence starts on one line and ends on a different line, only the  
first line will be colored in less.

As a result, when diff creates colored output with multi-line deletes  
or adds, less will only color the first line.

I've attached a patch to reset ANSI color to the default at the end of  
every line and restart it at the beginning of the next. It patches  
normal and context mode. Side-by-side already worked in my testing.

I hope it's useful to you. Please let me know if there are changes you  
would like made before you can accept it.

--Dennis Lambe Jr.
[99-color-escapes-every-line.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: "Dennis Lambe Jr." <malsyned <at> malsyned.net>
Cc: 31105-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#31105: bug#31105: [PATCH] Restart and reset
 ANSI escapes on each line for compatibility with less -R
Date: Sun, 30 Dec 2018 22:25:35 -0800
On Sun, Dec 30, 2018 at 8:18 PM Dennis Lambe Jr. <malsyned <at> malsyned.net> wrote:
> Quoting Jim Meyering <jim <at> meyering.net>:
> > Here's the result. Please review carefully and let me know if you
> > would like to change anything. I won't push until after I've heard
> > from you.
>
> Looks great to me -- thanks!

Thanks. With that, I've pushed it and am marking this as "done".


This bug report was last modified 6 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.