All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: "Shawn O . Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] git-gui: support for underline styles
Date: Fri, 19 Nov 2010 10:00:49 +0000	[thread overview]
Message-ID: <87oc9lhbjx.fsf@fox.patthoyts.tk> (raw)
In-Reply-To: <1289815498-12287-1-git-send-email-bert.wesarg@googlemail.com> (Bert Wesarg's message of "Mon, 15 Nov 2010 11:04:58 +0100")


Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---

I left underline out because I reckon it would just make text harder to
read on a gui display. It seems like the option would only be useful on
monochrome terminals.

If we do want to support underlines in the diff view window then we can
have a different tag rather than replicating each color to get a
underlined version of the same color.
Something like the following should do it:


 git-gui.sh   |    1 +
 lib/diff.tcl |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index d3acf0d..137cd72 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3330,6 +3330,7 @@ foreach {n c} {0 black 1 red4 2 green4 3 yellow4 4 blue4 5 magenta4 6 cyan4 7 gr
 	$ui_diff tag configure clri3$n -background $c
 }
 $ui_diff tag configure clr1 -font font_diffbold
+$ui_diff tag configure clr4 -underline 1
 
 $ui_diff tag conf d_cr -elide true
 $ui_diff tag conf d_@ -font font_diffbold
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 0579fa6..203ab07 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -473,7 +473,7 @@ proc read_diff {fd cont_info} {
 			set prefix clr
 			foreach style [split $colbegin ";"] {
 				if {$style eq "7"} {append prefix i; continue}
-				if {$style < 30 || $style > 47} {continue}
+				if {$style != 4 && ($style < 30 || $style > 47)} {continue}
 				set a "$mark linestart + $posbegin chars"
 				set b "$mark linestart + $posend chars"
 				catch {$ui_diff tag add $prefix$style $a $b}
-- 
1.7.3.1.msysgit.0

  reply	other threads:[~2010-11-19 10:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 10:04 [PATCH] git-gui: support for underline styles Bert Wesarg
2010-11-19 10:00 ` Pat Thoyts [this message]
2010-11-19 10:55   ` Bert Wesarg
2011-02-27 20:04   ` Bert Wesarg
2011-03-30  6:44     ` [PATCH 1/2] " Bert Wesarg
  -- strict thread matches above, loose matches on Subject: below --
2010-11-16  7:49 [PATCH] git-gui: respect conflict marker size Bert Wesarg
2010-11-16  9:21 ` [PATCHv2 1/2] " Bert Wesarg
2010-11-16  9:26   ` [PATCH 2/2] git-gui: support for diff3 conflict style Bert Wesarg
2010-11-19 11:41     ` Pat Thoyts
2010-11-19 12:05       ` Bert Wesarg
2011-02-27 20:15       ` Bert Wesarg
2011-03-30  6:44         ` Bert Wesarg
2011-03-30  7:18           ` [PATCH 2v2/2] " Bert Wesarg
2011-10-20 19:35             ` Bert Wesarg
2010-11-19 11:20   ` [PATCHv2 1/2] git-gui: respect conflict marker size Pat Thoyts
2010-11-19 11:48     ` Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oc9lhbjx.fsf@fox.patthoyts.tk \
    --to=patthoyts@users.sourceforge.net \
    --cc=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.