]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
Fixed <END> key.
authorsopwith <sopwith>
Mon, 20 Oct 1997 23:21:14 +0000 (23:21 +0000)
committersopwith <sopwith>
Mon, 20 Oct 1997 23:21:14 +0000 (23:21 +0000)
listbox.c

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