X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=15422b96bc94a5c82fd29e93a11df7c4317c2e1c;hp=4862df5ed9595459e8beed9cfa76946f71c54f9d;hb=31233289bedbb596b98eadd411bc6aac54d4ed69;hpb=89a8b08bf41981eaf21c733400d8a14f93c90159 diff --git a/gui.c b/gui.c index 4862df5e..15422b96 100644 --- a/gui.c +++ b/gui.c @@ -1092,13 +1092,14 @@ static void com_page_up(void) { unsigned lines; int fvr = first_visible_rbe(&lines); + if (fvr < 0 || fvr + 1 >= ringbuffer_filled(bot_win_rb)) { print_in_bar(COLOR_ERRMSG, "top of buffer is shown\n"); return; } scroll_position = fvr + 1; for (; scroll_position > 0; scroll_position--) { - fvr = first_visible_rbe(&lines); + first_visible_rbe(&lines); if (lines == bot.lines) break; }