diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/cli_interactor.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/cli_interactor.rs b/src/lib/cli_interactor.rs index 97f99e8..cfb41f0 100644 --- a/src/lib/cli_interactor.rs +++ b/src/lib/cli_interactor.rs | |||
| @@ -420,8 +420,12 @@ where | |||
| 420 | .with_defaults(current_defaults), | 420 | .with_defaults(current_defaults), |
| 421 | )?; | 421 | )?; |
| 422 | 422 | ||
| 423 | // Collect selected choices | 423 | // Collect selected choices and update defaults to reflect the user's actual |
| 424 | // selections | ||
| 424 | selected_choices.clear(); // Clear previous selections to update | 425 | selected_choices.clear(); // Clear previous selections to update |
| 426 | for (i, default) in defaults.iter_mut().enumerate() { | ||
| 427 | *default = selected_indices.contains(&i); | ||
| 428 | } | ||
| 425 | for &index in &selected_indices { | 429 | for &index in &selected_indices { |
| 426 | if index < choices.len() { | 430 | if index < choices.len() { |
| 427 | // Exclude 'add another' option | 431 | // Exclude 'add another' option |