mirror of
https://github.com/git/git
synced 2024-09-13 21:34:42 +00:00
gitk: Fix two bugs reported by users
The first was a simple typo where I put $yc instead of [yc $row]. The second was that I broke the logic for keeping up with fast movement through the commits, e.g. when you select a commit and then press down-arrow and let it autorepeat. That got broken when I changed the merge diff display to use git-diff-tree --cc. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
eb447a126c
commit
7a1d9d14c8
22
gitk
22
gitk
|
@ -1267,9 +1267,9 @@ proc drawlineseg {id i} {
|
||||||
set x [xc $row $ccol]
|
set x [xc $row $ccol]
|
||||||
set y [yc $row]
|
set y [yc $row]
|
||||||
if {$ccol < $col - 1} {
|
if {$ccol < $col - 1} {
|
||||||
lappend coords [xc $row [expr {$col - 1}]] $yc
|
lappend coords [xc $row [expr {$col - 1}]] [yc $row]
|
||||||
} elseif {$ccol > $col + 1} {
|
} elseif {$ccol > $col + 1} {
|
||||||
lappend coords [xc $row [expr {$col + 1}]] $yc
|
lappend coords [xc $row [expr {$col + 1}]] [yc $row]
|
||||||
}
|
}
|
||||||
lappend coords $x $y
|
lappend coords $x $y
|
||||||
}
|
}
|
||||||
|
@ -2451,9 +2451,10 @@ proc goforw {} {
|
||||||
|
|
||||||
proc mergediff {id} {
|
proc mergediff {id} {
|
||||||
global parents diffmergeid diffopts mdifffd
|
global parents diffmergeid diffopts mdifffd
|
||||||
global difffilestart
|
global difffilestart diffids
|
||||||
|
|
||||||
set diffmergeid $id
|
set diffmergeid $id
|
||||||
|
set diffids $id
|
||||||
catch {unset difffilestart}
|
catch {unset difffilestart}
|
||||||
# this doesn't seem to actually affect anything...
|
# this doesn't seem to actually affect anything...
|
||||||
set env(GIT_DIFF_OPTS) $diffopts
|
set env(GIT_DIFF_OPTS) $diffopts
|
||||||
|
@ -2470,7 +2471,7 @@ proc mergediff {id} {
|
||||||
|
|
||||||
proc getmergediffline {mdf id} {
|
proc getmergediffline {mdf id} {
|
||||||
global diffmergeid ctext cflist nextupdate nparents mergemax
|
global diffmergeid ctext cflist nextupdate nparents mergemax
|
||||||
global difffilestart
|
global difffilestart mdifffd
|
||||||
|
|
||||||
set n [gets $mdf line]
|
set n [gets $mdf line]
|
||||||
if {$n < 0} {
|
if {$n < 0} {
|
||||||
|
@ -2479,7 +2480,8 @@ proc getmergediffline {mdf id} {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if {![info exists diffmergeid] || $id != $diffmergeid} {
|
if {![info exists diffmergeid] || $id != $diffmergeid
|
||||||
|
|| $mdf != $mdifffd($id)} {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$ctext conf -state normal
|
$ctext conf -state normal
|
||||||
|
@ -2589,13 +2591,11 @@ proc gettreediffline {gdtf ids} {
|
||||||
set treediffs($ids) $treediff
|
set treediffs($ids) $treediff
|
||||||
unset treepending
|
unset treepending
|
||||||
if {$ids != $diffids} {
|
if {$ids != $diffids} {
|
||||||
gettreediffs $diffids
|
if {![info exists diffmergeid]} {
|
||||||
} else {
|
gettreediffs $diffids
|
||||||
if {[info exists diffmergeid]} {
|
|
||||||
contmergediff $ids
|
|
||||||
} else {
|
|
||||||
addtocflist $ids
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
addtocflist $ids
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue