diff --git a/gnoemoe/widgets/gm-text-scroller.c b/gnoemoe/widgets/gm-text-scroller.c index 3e02085..d3c1148 100644 --- a/gnoemoe/widgets/gm-text-scroller.c +++ b/gnoemoe/widgets/gm-text-scroller.c @@ -227,7 +227,15 @@ on_gm_text_scroller_text_view_size_allocate(GtkWidget *widget, GtkAllocation *allocation, GmTextScroller *scroller) { if (gm_text_scroller_is_end_scrolled_margin(scroller, abs(allocation->height - scroller->priv->allocation.height))) { - gm_text_scroller_scroll_end(scroller); + if (scroller->priv->idle_handler == 0) { + gm_text_scroller_scroll_end(scroller); + + // Ensure the end scroll for large texts + scroller->priv->idle_handler = g_idle_add((GSourceFunc) + gm_text_scroller_scroll_end_idle, scroller); + } + } else { + GM_DEBUG("Size allocate"); } scroller->priv->allocation = *allocation;