It's easy to miss that choices are special-cased to pass on their mode as the parent dependency. No functional changes. Only comments added.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -323,6 +323,13 @@ void menu_finalize(struct menu *parent) · 322 unmodified lines | |||
| 323 | if (menu->sym && menu->sym->type == S_UNKNOWN) | 323 | if (menu->sym && menu->sym->type == S_UNKNOWN) |
| 324 | menu_set_type(sym->type); | 324 | menu_set_type(sym->type); |
| 325 | } | 325 | } |
| 326 | |||
| 327 | /* | ||
| 328 | * Use the choice itself as the parent dependency of | ||
| 329 | * the contained items. This turns the mode of the | ||
| 330 | * choice into an upper bound on the visibility of the | ||
| 331 | * choice value symbols. | ||
| 332 | */ | ||
| 326 | parentdep = expr_alloc_symbol(sym); | 333 | parentdep = expr_alloc_symbol(sym); |
| 327 | } else if (parent->prompt) | 334 | } else if (parent->prompt) |
| 328 | parentdep = parent->prompt->visible.expr; | 335 | parentdep = parent->prompt->visible.expr; |