Commit 494d3b8
committed
gitk: Avoid Tcl error when switching views
Michele Ballabio <barra_cuda@katamail.com> pointed out that gitk
sometimes throws a Tcl error (can't read "yscreen") when switching
views, and proposed a patch. This is a different way of fixing it
which is a bit neater. Basically, in showview we only set yscreen if
the selected commit is on screen to start with, and then we only
scroll the canvas to bring it onscreen if yscreen is set and the
same commit exists in the new view.
Signed-off-by: Paul Mackerras <paulus@samba.org>1 parent cb8329a commit 494d3b8
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2102 | 2102 | | |
2103 | 2103 | | |
2104 | 2104 | | |
2105 | | - | |
2106 | | - | |
2107 | 2105 | | |
2108 | 2106 | | |
2109 | 2107 | | |
| |||
2164 | 2162 | | |
2165 | 2163 | | |
2166 | 2164 | | |
2167 | | - | |
| 2165 | + | |
2168 | 2166 | | |
2169 | 2167 | | |
2170 | 2168 | | |
| |||
0 commit comments