Skip to content

Commit

Permalink
kconfig: lxdialog: fix cursor render in checklist
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Bystrin authored and Masahiro Yamada committed Feb 20, 2024
1 parent d2d5cba commit ba3b759
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/kconfig/lxdialog/checklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,

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);
Expand Down

0 comments on commit ba3b759

Please sign in to comment.