@@ -593,6 +593,7 @@ proc makewindow {} {
593
593
frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
594
594
}
595
595
frame .bleft.top
596
+ frame .bleft.mid
596
597
597
598
button .bleft.top.search -text " Search" -command dosearch \
598
599
-font $uifont
@@ -602,12 +603,20 @@ proc makewindow {} {
602
603
lappend entries $sstring
603
604
trace add variable searchstring write incrsearch
604
605
pack $sstring -side left -expand 1 -fill x
606
+ radiobutton .bleft.mid.diff -text " Diff" \
607
+ -command changediffdisp -variable diffelide -value {0 0}
608
+ radiobutton .bleft.mid.old -text " Old version" \
609
+ -command changediffdisp -variable diffelide -value {0 1}
610
+ radiobutton .bleft.mid.new -text " New version" \
611
+ -command changediffdisp -variable diffelide -value {1 0}
612
+ pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
605
613
set ctext .bleft.ctext
606
614
text $ctext -background $bgcolor -foreground $fgcolor \
607
615
-state disabled -font $textfont \
608
616
-yscrollcommand scrolltext -wrap none
609
617
scrollbar .bleft.sb -command " $ctext yview"
610
618
pack .bleft.top -side top -fill x
619
+ pack .bleft.mid -side top -fill x
611
620
pack .bleft.sb -side right -fill y
612
621
pack $ctext -side left -fill both -expand 1
613
622
lappend bglist $ctext
@@ -4486,6 +4495,13 @@ proc getblobdiffline {bdf ids} {
4486
4495
}
4487
4496
}
4488
4497
4498
+ proc changediffdisp {} {
4499
+ global ctext diffelide
4500
+
4501
+ $ctext tag conf d0 -elide [lindex $diffelide 0]
4502
+ $ctext tag conf d1 -elide [lindex $diffelide 1]
4503
+ }
4504
+
4489
4505
proc prevfile {} {
4490
4506
global difffilestart ctext
4491
4507
set prev [lindex $difffilestart 0]
@@ -6330,6 +6346,7 @@ set highlight_paths {}
6330
6346
set searchdirn -forwards
6331
6347
set boldrows {}
6332
6348
set boldnamerows {}
6349
+ set diffelide {0 0}
6333
6350
6334
6351
set optim_delay 16
6335
6352
0 commit comments