summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7272131)
raw | patch | inline | side by side (parent: 7272131)
author | Alexander Gavrilov <angavrilov@gmail.com> | |
Sat, 26 Jul 2008 16:13:45 +0000 (20:13 +0400) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Thu, 31 Jul 2008 10:29:44 +0000 (20:29 +1000) |
- Switching views now actually preserves the selected commit.
- Reloading (also Edit View) preserves the currently selected commit.
- Initial selection does not produce weird scrolling.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
- Reloading (also Edit View) preserves the currently selected commit.
- Initial selection does not produce weird scrolling.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index abb6542c5f3b39c9f86cf0cfd4d26860d3de2d75..5021437d6548ed7599580ade4ef47b0f3fe6403a 100755 (executable)
--- a/gitk
+++ b/gitk
global viewargs viewargscmd viewfiles vfilelimit
global showlocalchanges commitinterest
global viewactive viewinstances vmergeonly
- global pending_select mainheadid
+ global mainheadid
global vcanopt vflags vrevs vorigargs
set startmsecs [clock clicks -milliseconds]
}
filerun $fd [list getcommitlines $fd $i $view 0]
nowbusy $view [mc "Reading"]
- if {$view == $curview} {
- set pending_select $mainheadid
- }
set viewcomplete($view) 0
set viewactive($view) 1
return 1
set viewinstances($view) {}
}
-proc getcommits {} {
+proc reset_pending_select {selid} {
+ global pending_select mainheadid
+
+ if {$selid ne {}} {
+ set pending_select $selid
+ } else {
+ set pending_select $mainheadid
+ }
+}
+
+proc getcommits {selid} {
global canv curview need_redisplay viewactive
initlayout
if {[start_rev_list $curview]} {
+ reset_pending_select $selid
show_status [mc "Reading commits..."]
set need_redisplay 1
} else {
filerun $fd [list getcommitlines $fd $i $view 1]
incr viewactive($view)
set viewcomplete($view) 0
- set pending_select $mainheadid
+ reset_pending_select {}
nowbusy $view "Reading"
if {$showneartags} {
getallcommits
global showneartags treediffs commitinterest cached_commitrow
global targetid
+ set selid {}
+ if {$selectedline ne {}} {
+ set selid $currentid
+ }
+
if {!$viewcomplete($curview)} {
stop_rev_list $curview
}
catch {unset cached_commitrow}
catch {unset targetid}
setcanvscroll
- getcommits
+ getcommits $selid
return 0
}
run refill_reflist
if {![info exists viewcomplete($n)]} {
- if {$selid ne {}} {
- set pending_select $selid
- }
- getcommits
+ getcommits $selid
return
}
} elseif {$mainheadid ne {} && [commitinview $mainheadid $curview]} {
selectline [rowofcommit $mainheadid] 1
} elseif {!$viewcomplete($n)} {
- if {$selid ne {}} {
- set pending_select $selid
- } else {
- set pending_select $mainheadid
- }
+ reset_pending_select $selid
} else {
set row [first_real_row]
if {$row < $numcommits} {
}
if {[info exists pending_select] &&
[commitinview $pending_select $curview]} {
+ update
selectline [rowofcommit $pending_select] 1
}
drawvisible
addviewmenu $n
}
}
-getcommits
+getcommits {}