From: sopwith Date: Mon, 20 Oct 1997 23:49:59 +0000 (+0000) Subject: End key works properly now; tests run show that this is true :) X-Git-Tag: r0-20~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae5aa3acb0559c42647d1dfbde852866969c630c;p=thirdparty%2Fnewt.git End key works properly now; tests run show that this is true :) --- diff --git a/listbox.c b/listbox.c index c5753b8..2813cd7 100644 --- a/listbox.c +++ b/listbox.c @@ -589,10 +589,11 @@ static struct eventResult listboxEvent(newtComponent co, struct event ev) { case NEWT_KEY_END: if(li->numItems <= 0) break; - li->startShowItem = li->numItems - li->curHeight - 1; + li->startShowItem = li->numItems - li->curHeight; if(li->startShowItem < 0) li->startShowItem = 0; - newtListboxRealSetCurrent(co, li->numItems - 1); + li->currItem = li->numItems - 1; + newtListboxRealSetCurrent(co); er.result = ER_SWALLOWED; break; default: