aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-08-28 22:41:09 +1000
committerPaul Mackerras <paulus@samba.org>2006-08-28 22:41:09 +1000
commit561d038ab8adb2bab5ba368b88e620be18c4811b (patch)
treee845eca4f8f313333a204ea1c7c7631a4a3d84ad /gitk
parentd1e46756d312f65613863a41c256d852fcde330c (diff)
downloadgit-561d038ab8adb2bab5ba368b88e620be18c4811b.tar.gz
git-561d038ab8adb2bab5ba368b88e620be18c4811b.tar.xz
gitk: Fix some bugs in the new cherry-picking code
When inserting the new commit row for the cherry-picked commit, we weren't advancing the selected line (if there is one), and we weren't updating commitlisted properly.
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk8
1 files changed, 6 insertions, 2 deletions
diff --git a/gitk b/gitk
index b66ccca4d..ebbeac63a 100755
--- a/gitk
+++ b/gitk
@@ -3314,14 +3314,14 @@ proc finishcommits {} {
catch {unset pending_select}
}
-# Inserting a new commit as the child of the commit on row $row.
+# Insert a new commit as the child of the commit on row $row.
# The new commit will be displayed on row $row and the commits
# on that row and below will move down one row.
proc insertrow {row newcmit} {
global displayorder parentlist childlist commitlisted
global commitrow curview rowidlist rowoffsets numcommits
global rowrangelist idrowranges rowlaidout rowoptim numcommits
- global linesegends
+ global linesegends selectedline
if {$row >= $numcommits} {
puts "oops, inserting new row $row but only have $numcommits rows"
@@ -3334,6 +3334,7 @@ proc insertrow {row newcmit} {
lappend kids $newcmit
lset childlist $row $kids
set childlist [linsert $childlist $row {}]
+ set commitlisted [linsert $commitlisted $row 1]
set l [llength $displayorder]
for {set r $row} {$r < $l} {incr r} {
set id [lindex $displayorder $r]
@@ -3409,6 +3410,9 @@ proc insertrow {row newcmit} {
incr rowoptim
incr numcommits
+ if {[info exists selectedline] && $selectedline >= $row} {
+ incr selectedline
+ }
redisplay
}