diff options
author | Eric Melville <eric@FreeBSD.org> | 2001-07-26 05:35:19 +0000 |
---|---|---|
committer | Eric Melville <eric@FreeBSD.org> | 2001-07-26 05:35:19 +0000 |
commit | 5dc547c27e7ef04dbc0bd746afea9959a2c725d6 (patch) | |
tree | beac91fd030d7914b5446418ded90d5f185fc89a | |
parent | 362f39c0e60af10c3044e1955ce1b17119f7c9ac (diff) | |
download | src-5dc547c27e7ef04dbc0bd746afea9959a2c725d6.tar.gz src-5dc547c27e7ef04dbc0bd746afea9959a2c725d6.zip |
Properly update cursor position when the list is scrolled.
Notes
Notes:
svn path=/head/; revision=80375
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 10 | ||||
-rw-r--r-- | gnu/lib/libdialog/radiolist.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index e28a79cfe19b..188b542931df 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -300,9 +300,10 @@ draw: scroll--; print_item(list, items[scroll*3], items[scroll*3 + 1], status[scroll], 0, TRUE, DREF(ditems, scroll), list_width, item_x, check_x); - wnoutrefresh(list); print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); - wrefresh(dialog); + wmove(list, choice, check_x+1); + wnoutrefresh(dialog); + wrefresh(list); } continue; /* wait for another key press */ } @@ -329,9 +330,10 @@ draw: items[(scroll + max_choice - 1) * 3 + 1], status[scroll + max_choice - 1], max_choice - 1, TRUE, DREF(ditems, scroll + max_choice - 1), list_width, item_x, check_x); - wnoutrefresh(list); print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); - wrefresh(dialog); + wmove(list, choice, check_x+1); + wnoutrefresh(dialog); + wrefresh(list); } continue; /* wait for another key press */ } diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index e4e937252d39..5166ccecfefd 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -312,9 +312,10 @@ draw: scroll--; print_item(list, items[scroll*3], items[scroll*3 + 1], status[scroll], 0, TRUE, DREF(ditems, scroll)); - wnoutrefresh(list); print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); - wrefresh(dialog); + wmove(list, choice, check_x+1); + wnoutrefresh(dialog); + wrefresh(list); } continue; /* wait for another key press */ } @@ -341,9 +342,10 @@ draw: items[(scroll + max_choice - 1) * 3 + 1], status[scroll + max_choice - 1], max_choice - 1, TRUE, DREF(ditems, scroll + max_choice - 1)); - wnoutrefresh(list); print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y); - wrefresh(dialog); + wmove(list, choice, check_x+1); + wnoutrefresh(dialog); + wrefresh(list); } continue; /* wait for another key press */ } |