From: rodin Date: Sun, 18 Apr 2010 09:28:34 +0000 (+0000) Subject: Don't page when window is too small X-Git-Tag: v0.9~230 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=de3f693d3120d81e3e65188ed29f9ddfcbb96f19;hp=1e727a966a422cb93f983768bc1a007011db1ad9;p=projects%2Fchimara%2Fchimara.git Don't page when window is too small --- diff --git a/libchimara/pager.c b/libchimara/pager.c index 8fa8031..d685542 100644 --- a/libchimara/pager.c +++ b/libchimara/pager.c @@ -66,6 +66,10 @@ pager_after_size_allocate(GtkTextView *view, GtkAllocation *allocation, winid_t /* Move the pager to the last visible character in the buffer */ gint view_height, scroll_distance; move_pager_and_get_scroll_distance( GTK_TEXT_VIEW(win->widget), &view_height, &scroll_distance ); + + if(view_height <= 1) + /* Paging is unusable when window is too small */ + return; if(!win->currently_paging) { if(scroll_distance > view_height) {