login

<     >

2015-06-14 13:45:09 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Let scroll correction to update_view() when possible.

diff --git a/rover.c b/rover.c
index 25585b4..2619b79 100644
--- a/rover.c
+++ b/rover.c
@@ -890,12 +890,10 @@ main(int argc, char *argv[])
         } else if (!strcmp(key, RVK_JUMP_TOP)) {
             if (!rover.nfiles) continue;
             ESEL = 0;
-            SCROLL = 0;
             update_view();
         } else if (!strcmp(key, RVK_JUMP_BOTTOM)) {
             if (!rover.nfiles) continue;
             ESEL = 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;