From 6518472d891464c1599377e645ed0f552b959807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Ch=C3=A9ramy?= Date: Sat, 5 Jul 2014 20:28:18 +0200 Subject: [PATCH] Fix scroll down and up in double-page mode. --- shortcuts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shortcuts.c b/shortcuts.c index b8352d0..92bb286 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -385,8 +385,12 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument, } } - if ((new_page < 0 || new_page >= number_of_pages) && !scroll_wrap) { - return false; + if (!scroll_wrap) { + if (new_page <= 0) { + new_page = 0; + } else if (new_page >= number_of_pages) { + new_page = number_of_pages - 1; + } } page_set(zathura, new_page);