Faster movement key bindings

This commit is contained in:
lostd 2014-10-10 15:46:13 +03:00
parent de7072bdd5
commit 15ba1b15b8
1 changed files with 12 additions and 0 deletions

12
noice.c
View File

@ -229,6 +229,18 @@ nextsel(int *cur, int max)
if (*cur > 0)
(*cur)--;
break;
/* Page down */
case KEY_NPAGE:
case CONTROL('D'):
if (*cur < max -1)
(*cur) += MIN((LINES - 4) / 2, max - 1 - *cur);
break;
/* Page up */
case KEY_PPAGE:
case CONTROL('U'):
if (*cur > 0)
(*cur) -= MIN((LINES - 4) / 2, *cur);
break;
}
return 0;