From 759caf0f8fa593430adea676fc64612b5197dca8 Mon Sep 17 00:00:00 2001 From: Hisham Date: Wed, 4 May 2016 22:41:52 -0300 Subject: Make PgDown behavior more usual. Closes #480. --- Panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Panel.c') 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: -- cgit v1.2.3