The "--tk" option to Fossil's diff is great, but I find myself wanting
to hit q to close the window. Here, in case anyone is interested, is a
patch which allows that:
Index: src/diffcmd.c
==================================================================
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -602,13 +602,15 @@
static const char zDiffScript[] =
@ package require Tk
@ wm withdraw .
@ wm title . {Fossil Diff}
@ wm iconname . {Fossil Diff}
+@ bind . <KeyPress-q> {exit}
@ set body {}
@ set mx 80 ;# Length of the longest line of text
@ set nLine 0 ;# Number of lines of text
+@ label .l -text {To exit press q or close the window.}
@ text .t -width 180 -yscroll {.sb set}
@ if {$tcl_platform(platform)=="windows"} {.t config -font {courier 9}}
@ .t tag config ln -foreground gray
@ .t tag config chng -background {#d0d0ff}
@ .t tag config add -background {#c0ffc0}
@@ -635,10 +637,11 @@
@ }
@ close $in
@ if {$mx>250} {set mx 250} ;# Limit window width to 200 characters
@ if {$nLine>55} {set nLine 55} ;# Limit window height to 55 lines
@ .t config -height $nLine -width $mx
+@ pack .l -side top
@ pack .t -side left -fill both -expand 1
@ scrollbar .sb -command {.t yview} -orient vertical
@ pack .sb -side left -fill y
@ wm deiconify .
;
--
Edward Berner
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users