Anonymous avatar Anonymous committed bff898b Merge

Merge git:// into maint

* git://
gitk: Allow user to choose whether to see the diff, old file, or new file

Comments (0)

Files changed (1)

         frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
+    frame .bleft.mid
     button -text "Search" -command dosearch \
 	-font $uifont
     lappend entries $sstring
     trace add variable searchstring write incrsearch
     pack $sstring -side left -expand 1 -fill x
+    radiobutton .bleft.mid.diff -text "Diff" \
+	-command changediffdisp -variable diffelide -value {0 0}
+    radiobutton .bleft.mid.old -text "Old version" \
+	-command changediffdisp -variable diffelide -value {0 1}
+    radiobutton -text "New version" \
+	-command changediffdisp -variable diffelide -value {1 0}
+    pack .bleft.mid.diff .bleft.mid.old -side left
     set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font $textfont \
 	-yscrollcommand scrolltext -wrap none
     scrollbar -command "$ctext yview"
     pack -side top -fill x
+    pack .bleft.mid -side top -fill x
     pack -side right -fill y
     pack $ctext -side left -fill both -expand 1
     lappend bglist $ctext
+proc changediffdisp {} {
+    global ctext diffelide
+    $ctext tag conf d0 -elide [lindex $diffelide 0]
+    $ctext tag conf d1 -elide [lindex $diffelide 1]
 proc prevfile {} {
     global difffilestart ctext
     set prev [lindex $difffilestart 0]
 set searchdirn -forwards
 set boldrows {}
 set boldnamerows {}
+set diffelide {0 0}
 set optim_delay 16
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.