login

<     >

2015-06-05 13:16:46 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Better scroll setting after "jump to bottom" with few entries.

diff --git a/rover.c b/rover.c
index 57e301f..63fb9dc 100644
--- a/rover.c
+++ b/rover.c
@@ -856,7 +856,7 @@ main(int argc, char *argv[])
         } else if (!strcmp(key, RVK_JUMP_BOTTOM)) {
             if (!rover.nfiles) continue;
             ESEL = rover.nfiles - 1;
-            SCROLL = HEIGHT - rover.nfiles - 1;
+            SCROLL = MAX(rover.nfiles - 1 - HEIGHT, 0);
             update_view();
         } else if (!strcmp(key, RVK_CD_DOWN)) {
             if (!rover.nfiles || !S_ISDIR(EMODE(ESEL))) continue;