aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--noice.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/noice.c b/noice.c
index 3330b67..4af580e 100644
--- 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;