diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f13d4..23a7468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### Fixed +- Don't deselect just selected option - Added missing init code in non-async template diff --git a/src/tui.rs b/src/tui.rs index 3ba1395..4d639bc 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -67,6 +67,7 @@ impl Repository { self.selected.push(option.name.to_string()); } + let toggled_option = option; let currently_selected = self.selected.clone(); for option in currently_selected { let Some(option) = find_option(&option, self.options) else { @@ -79,7 +80,9 @@ impl Repository { } } for disable in option.disables { - if self.selected.contains(&disable.to_string()) { + if disable != &toggled_option.name + && self.selected.contains(&disable.to_string()) + { let Some(idx) = self.selected.iter().position(|v| v == disable) else { ratatui::restore(); panic!("disable option not found");