summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 567c34e)
raw | patch | inline | side by side (parent: 567c34e)
author | Alexander Gavrilov <angavrilov@gmail.com> | |
Sat, 26 Jul 2008 16:15:54 +0000 (20:15 +0400) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Thu, 31 Jul 2008 10:29:44 +0000 (20:29 +1000) |
Try selecting the head, if the previously selected commit
is not available in the new view.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
is not available in the new view.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 5021437d6548ed7599580ade4ef47b0f3fe6403a..d093a39506798c750cc838f0085f6721e0f733a9 100755 (executable)
--- a/gitk
+++ b/gitk
global numcommits startmsecs
if {[info exists pending_select]} {
- set row [first_real_row]
- selectline $row 1
+ update
+ reset_pending_select {}
+
+ if {[commitinview $pending_select $curview]} {
+ selectline [rowofcommit $pending_select] 1
+ } else {
+ set row [first_real_row]
+ selectline $row 1
+ }
}
if {$commitidx($curview) > 0} {
#set ms [expr {[clock clicks -milliseconds] - $startmsecs}]
drawvisible
if {$row ne {}} {
selectline $row 0
- } elseif {$mainheadid ne {} && [commitinview $mainheadid $curview]} {
- selectline [rowofcommit $mainheadid] 1
} elseif {!$viewcomplete($n)} {
reset_pending_select $selid
} else {
- set row [first_real_row]
- if {$row < $numcommits} {
- selectline $row 0
+ reset_pending_select {}
+
+ if {[commitinview $pending_select $curview]} {
+ selectline [rowofcommit $pending_select] 1
+ } else {
+ set row [first_real_row]
+ if {$row < $numcommits} {
+ selectline $row 0
+ }
}
}
if {!$viewcomplete($n)} {