kconfig: menuconfig: simplify global jump key assignment
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 16 Jul 2023 04:55:07 +0000 (13:55 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 24 Jul 2023 15:59:32 +0000 (00:59 +0900)
commite14f1242a8be413846360b295102abd4c62848ad
tree65973a8357a893e797eb94d70e302988a6bcd7a4
parent481461f5109919babbb393d6f68002936b8e2493
kconfig: menuconfig: simplify global jump key assignment

Commit 95ac9b3b585d ("menuconfig: Assign jump keys per-page instead
of globally") injected a lot of hacks to the bottom of the textbox
infrastructure.

I reverted many of them without changing the behavior. (almost)
Now, the key markers are inserted when constructing the search result
instead of updating the text buffer on-the-fly.

The buffer passed to the textbox got back to a constant string.
The ugly casts from (const char *) to (char *) went away.

A disadvantage is that the same key numbers might be displayed multiple
times in the dialog if you use a huge window (but I believe it is
unlikely to happen).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Jesse Taube <Mr.Bossman075@gmail.com>
scripts/kconfig/lkc.h
scripts/kconfig/lxdialog/dialog.h
scripts/kconfig/lxdialog/textbox.c
scripts/kconfig/mconf.c
scripts/kconfig/menu.c