X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fpager.c;h=d6855420dd02288022ae9bf9808d4536b5b4697a;hp=8fa8031a1ccc08ab4ecbe8f6b15ed626c6492cd1;hb=f9da0575598e6fd9ada633ccda68b0efabcc218d;hpb=02dacdfeec2bb204aff8dae862ece880c58f5e0c 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) {