git-gui: Don't show blame tooltips that we have no data for
authorShawn O. Pearce <spearce@spearce.org>
Thu, 19 Jul 2007 05:45:42 +0000 (01:45 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 19 Jul 2007 05:45:42 +0000 (01:45 -0400)
If we haven't yet loaded any commit information for a given line but
our tooltip timer fired and tried to draw the tooltip we shouldn't;
there is nothing to show.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/blame.tcl

index 4da60ac9af51b73cdb0b12d5345ec581c0f9f323..96072847a2ffeec814f499657744e5ed4f8988c0 100644 (file)
@@ -879,6 +879,11 @@ method _open_tooltip {cur_w} {
                set org [lindex $amov_data $lno]
        }
 
+       if {$dat eq {}} {
+               _hide_tooltip $this
+               return
+       }
+
        set cmit [lindex $dat 0]
        set tooltip_commit [list $cmit]