]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
End key works properly now; tests run show that this is true :)
authorsopwith <sopwith>
Mon, 20 Oct 1997 23:49:59 +0000 (23:49 +0000)
committersopwith <sopwith>
Mon, 20 Oct 1997 23:49:59 +0000 (23:49 +0000)
listbox.c

index c5753b89cacfe174ece7bc1f26e238068d82f924..2813cd7329bb3363385d31182ed3720304156ea2 100644 (file)
--- 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: