diff options
Diffstat (limited to 'gtkplaylist.c')
-rw-r--r-- | gtkplaylist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c index 41624580..4b5fc43b 100644 --- a/gtkplaylist.c +++ b/gtkplaylist.c @@ -125,6 +125,11 @@ gtkpl_setup_scrollbar (gtkplaylist_t *ps) { size = 0; } GtkWidget *scroll = ps->scrollbar; + if (ps->scrollpos > (*ps->pcount)-ps->nvisiblerows+1) { + int n = (*ps->pcount) - ps->nvisiblerows + 1; + ps->scrollpos = max (0, n); + gtk_range_set_value (GTK_RANGE (scroll), ps->scrollpos); + } if (size == 0) { gtk_widget_hide (scroll); } |