Code

git-gui: sort the numeric ansi codes
authorPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 19 Nov 2010 22:22:20 +0000 (22:22 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 4 Nov 2011 16:16:54 +0000 (16:16 +0000)
This ensures that underline does not conflict with inverse colors.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/diff.tcl

index 39e4d909b8c5f0f90f56c8e4a202976673026605..f5ed5d1dc66844fb58a2605285eb460fe14112a4 100644 (file)
@@ -502,7 +502,7 @@ proc read_diff {fd conflict_size cont_info} {
 
                foreach {posbegin colbegin posend colend} $markup {
                        set prefix clr
-                       foreach style [split $colbegin ";"] {
+                       foreach style [lsort -integer [split $colbegin ";"]] {
                                if {$style eq "7"} {append prefix i; continue}
                                if {$style != 4 && ($style < 30 || $style > 47)} {continue}
                                set a "$mark linestart + $posbegin chars"