:disabled in the edit mode, cant type it tho, needs fix

This commit is contained in:
filipriec
2025-03-23 00:28:51 +01:00
parent 1a529a70bf
commit fef2f12c9a
2 changed files with 19 additions and 2 deletions

View File

@@ -81,6 +81,24 @@ impl EventHandler {
)));
}
// Global command mode activation
let context_action = config.get_action_for_current_context(
self.is_edit_mode,
self.command_mode,
app_state.ui.show_intro,
app_state.ui.show_admin,
key_code,
modifiers
);
if let Some("enter_command_mode") = context_action {
if self.is_edit_mode { return Ok((false, String::new())); }
self.command_mode = true;
self.command_input.clear();
self.command_message.clear();
return Ok((false, String::new()));
}
if let Some(action) = config.get_action_for_key_in_mode(
&config.keybindings.common,
key_code,