Commit 39177ec36236fb71257e51d0d198437b84170911
Committed by
Michal Marek
1 parent
0597fcd08b
Exists in
master
and in
7 other branches
nconf: handle comment entries within choice/endchoice
Equivalent to af6c1598 (kconfig: handle comment entries within choice/endchoice), but for nconfig instead. Implement support for comment entries within choice groups. Comment entries are displayed visually distinct from normal configs, and selecting them is a no-op. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
scripts/kconfig/nconf.c
... | ... | @@ -1266,9 +1266,13 @@ |
1266 | 1266 | if (child->sym == sym_get_choice_value(menu->sym)) |
1267 | 1267 | item_make(child, ':', "<X> %s", |
1268 | 1268 | _(menu_get_prompt(child))); |
1269 | - else | |
1269 | + else if (child->sym) | |
1270 | 1270 | item_make(child, ':', " %s", |
1271 | 1271 | _(menu_get_prompt(child))); |
1272 | + else | |
1273 | + item_make(child, ':', "*** %s ***", | |
1274 | + _(menu_get_prompt(child))); | |
1275 | + | |
1272 | 1276 | if (child->sym == active){ |
1273 | 1277 | last_top_row = top_row(curses_menu); |
1274 | 1278 | selected_index = i; |
... | ... | @@ -1334,7 +1338,7 @@ |
1334 | 1338 | break; |
1335 | 1339 | |
1336 | 1340 | child = item_data(); |
1337 | - if (!child || !menu_is_visible(child)) | |
1341 | + if (!child || !menu_is_visible(child) || !child->sym) | |
1338 | 1342 | continue; |
1339 | 1343 | switch (res) { |
1340 | 1344 | case ' ': |