commit 5faa0a6b41cf99c0675101d3702a48a81650a936 from: Marcel Rodrigues date: Sun Jun 14 16:37:19 2015 UTC Remove wrap-around behavior from 'j' & 'k'. That behavior provided a way to easily move between the top and bottom of listing. However, this is no longer needed due to the recent addition of 'g' & 'G'. The new behavior is also more similar to what we are used to in other programs. commit - 3e9a3ad7668453f4c045199e77dab38d86f65a0f commit + 5faa0a6b41cf99c0675101d3702a48a81650a936 blob - 518be41eaef7204abe7a6342a42c3bc009cb37de blob + 25585b465d53880c8b5e0f3a7868f6260ca48564 --- rover.c +++ rover.c @@ -870,11 +870,11 @@ main(int argc, char *argv[]) spawn(); } else if (!strcmp(key, RVK_DOWN)) { if (!rover.nfiles) continue; - ESEL = (ESEL + 1) % rover.nfiles; + ESEL = MIN(ESEL + 1, rover.nfiles - 1); update_view(); } else if (!strcmp(key, RVK_UP)) { if (!rover.nfiles) continue; - ESEL = ESEL ? ESEL - 1 : rover.nfiles - 1; + ESEL = MAX(ESEL - 1, 0); update_view(); } else if (!strcmp(key, RVK_JUMP_DOWN)) { if (!rover.nfiles) continue;