fix: reload editor saves and reject stale TUI actions

This commit is contained in:
objz committed 2026-10-01 23:25:43 +02:00
1 parent eb53c7164e
commit 9cd454cee2
33 files changed
+2297 -638

No files matched your search

@@ -5,6 +5,7 @@ mod render;
mod state;
pub use render::{popup_rect, render};
pub(in crate::tui) use state::text_input_active;
pub use state::{WizardParams, WizardState, WizardStep, handle_key, take_result};
#[cfg(test)]
@@ -116,6 +116,13 @@ pub fn take_result() -> Option<WizardParams> {
}
}
pub(in crate::tui) fn text_input_active() -> bool {
WIZARD_STATE.lock().is_ok_and(|state| {
state.step == WizardStep::Name
|| (state.step == WizardStep::Version && state.version_search.active)
})
}
fn handle_name_key(
state: &mut WizardState,
key_event: &KeyEvent,