noice

small file browser
git clone git://git.2f30.org/noice.git
Log | Files | Refs | README | LICENSE

commit 15ba1b15b8df852b69d9108b7af8b3e5dfb640be
parent de7072bdd537cead9cc117010b03afe6b6e21e86
Author: lostd <lostd@2f30.org>
Date:   Fri Oct 10 15:46:13 +0300

Faster movement key bindings

Diffstat:
noice.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/noice.c b/noice.c @@ -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;