Re: [PATCH] git-gui: support for underline styles

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

 



On Fri, Nov 19, 2010 at 11:00, Pat Thoyts
<patthoyts@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Suggested-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
> Signed-off-by: Pat Thoyts <patthoyts@xxxxxxxxxxxxxxxxxxxxx>
> ---
>
> 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:

I miss this in git-gui.git.

Thanks,
Bert

>
>
> Â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
>
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]