summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7297a1)
raw | patch | inline | side by side (parent: e7297a1)
author | Paul Mackerras <paulus@samba.org> | |
Tue, 15 Jan 2008 11:45:36 +0000 (22:45 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Tue, 15 Jan 2008 11:45:43 +0000 (22:45 +1100) |
Some of the stuff that commit 31c0eaa8cc10944ebca8aa31fb59f0b77b1b6e77
added to drawvisible isn't appropriate to do when we have no commits,
and this was causing a Tcl error if gitk was invoked in such a fashion
that no commits were selected. This fixes it by bailing out of
drawvisible early if there are no commits displayed.
Bug reported by Johannes Sixt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
added to drawvisible isn't appropriate to do when we have no commits,
and this was causing a Tcl error if gitk was invoked in such a fashion
that no commits were selected. This fixes it by bailing out of
drawvisible early if there are no commits displayed.
Bug reported by Johannes Sixt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 322ac93f86f8520310e2477ffc18f67047bf1221..c060ce98cb2749179c7dd1fa92bd466fcbd303f2 100755 (executable)
--- a/gitk
+++ b/gitk
set fs [$canv yview]
set ymax [lindex [$canv cget -scrollregion] 3]
- if {$ymax eq {} || $ymax == 0} return
+ if {$ymax eq {} || $ymax == 0 || $numcommits == 0} return
set f0 [lindex $fs 0]
set f1 [lindex $fs 1]
set y0 [expr {int($f0 * $ymax)}]