1

kconfig: lxdialog: fix cursor render in checklist

When a checklist is opened, the cursor is rendered in a wrong position
(after the last list element on the screen). You can observe it by
opening any checklist in menuconfig.

Added wmove() to set the cursor in the proper position, just like in
menubox.c. Removed wnoutrefresh(dialog) because dialog window has
already been updated in print_buttons(). Replaced wnoutrefresh(list) and
doupdate() calls with one wrefresh(list) call.

Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Matthew Bystrin 2024-02-16 17:10:14 +03:00 committed by Masahiro Yamada
parent d2d5cba5d9
commit ba3b759fb6

View File

@ -188,9 +188,8 @@ do_resize:
print_buttons(dialog, height, width, 0);
wnoutrefresh(dialog);
wnoutrefresh(list);
doupdate();
wmove(list, choice, check_x + 1);
wrefresh(list);
while (key != KEY_ESC) {
key = wgetch(dialog);