From: sopwith Date: Mon, 20 Oct 1997 23:21:14 +0000 (+0000) Subject: Fixed key. X-Git-Tag: r0-20~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50c7eaa1ad1ff4574555fe14ad28c29eecd5e752;p=thirdparty%2Fnewt.git Fixed key. --- 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: