From 50c7eaa1ad1ff4574555fe14ad28c29eecd5e752 Mon Sep 17 00:00:00 2001 From: sopwith Date: Mon, 20 Oct 1997 23:21:14 +0000 Subject: [PATCH] Fixed key. --- listbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/listbox.c b/listbox.c index 19143cf..c5753b8 100644 --- a/listbox.c +++ b/listbox.c @@ -589,7 +589,10 @@ static struct eventResult listboxEvent(newtComponent co, struct event ev) { case NEWT_KEY_END: if(li->numItems <= 0) break; - newtListboxSetCurrent(co, li->numItems - 1); + li->startShowItem = li->numItems - li->curHeight - 1; + if(li->startShowItem < 0) + li->startShowItem = 0; + newtListboxRealSetCurrent(co, li->numItems - 1); er.result = ER_SWALLOWED; break; default: -- 2.47.2