summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d76afb1)
raw | patch | inline | side by side (parent: d76afb1)
author | Paul Mackerras <paulus@samba.org> | |
Fri, 7 Mar 2008 11:51:55 +0000 (22:51 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Fri, 7 Mar 2008 11:51:55 +0000 (22:51 +1100) |
Since we limit the rate at which we do updates to the canvas scrolling
regions, it's possible to get into selectline for a row that is
outside the currently-set scrolling region. When this happens,
selectline can't scroll to show the selected line, and as a
consequence, drawvisible chooses some other bogus row to be the
target row.
This fixes it by calling setcanvscroll from selectline in this case.
We also set selectedline (and currentid) before calling drawvisible
so that drawvisible makes the right choice of target row.
Signed-off-by: Paul Mackerras <paulus@samba.org>
regions, it's possible to get into selectline for a row that is
outside the currently-set scrolling region. When this happens,
selectline can't scroll to show the selected line, and as a
consequence, drawvisible chooses some other bogus row to be the
target row.
This fixes it by calling setcanvscroll from selectline in this case.
We also set selectedline (and currentid) before calling drawvisible
so that drawvisible makes the right choice of target row.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 19325086bf68951df6a85d17beb1a513cbd8d64a..1125f68d35f1e58bfd3cdf06f3cb8ae8669415f1 100755 (executable)
--- a/gitk
+++ b/gitk
global commentend idtags linknum
global mergemax numcommits pending_select
global cmitmode showneartags allcommits
- global targetrow targetid
+ global targetrow targetid lastscrollrows
catch {unset pending_select}
$canv delete hover
set id [commitonrow $l]
set targetid $id
set targetrow $l
+ set selectedline $l
+ set currentid $id
+ if {$lastscrollrows < $numcommits} {
+ setcanvscroll
+ }
set y [expr {$canvy0 + $l * $linespc}]
set ymax [lindex [$canv cget -scrollregion] 3]
addtohistory [list selbyid $id]
}
- set selectedline $l
- set currentid $id
$sha1entry delete 0 end
$sha1entry insert 0 $id
$sha1entry selection from 0