summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-05-04 22:41:52 -0300
committerHisham <hisham@gobolinux.org>2016-05-04 22:41:52 -0300
commit759caf0f8fa593430adea676fc64612b5197dca8 (patch)
tree38396e50c09ba5fea46a3e8eaf0f9cb11f708ad1 /Panel.c
parentc37be409a99441b2edcace1152eb2fe7cb2a8074 (diff)
Make PgDown behavior more usual.
Closes #480.
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Panel.c b/Panel.c
index 1c45714f..65d13423 100644
--- a/Panel.c
+++ b/Panel.c
@@ -412,7 +412,7 @@ bool Panel_onKey(Panel* this, int key) {
break;
case KEY_NPAGE:
this->selected += (this->h - 1);
- this->scrollV += (this->h - 1);
+ this->scrollV = MIN(MAX(0, Vector_size(this->items) - this->h), this->selected - this->h);
this->needsRedraw = true;
break;
case KEY_WHEELUP:

© 2014-2024 Faster IT GmbH | imprint | privacy policy