trying to make the intro and admin with general keybindings
This commit is contained in:
@@ -112,6 +112,15 @@ impl EventHandler {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some("enter_command_mode") = config.get_action_for_key_in_mode(
|
||||
&config.keybindings.global,
|
||||
key_code,
|
||||
modifiers
|
||||
) {
|
||||
self.command_mode = true;
|
||||
return Ok((false, String::new()));
|
||||
}
|
||||
|
||||
// If no general action matched, return to stay in general mode
|
||||
return Ok((false, String::new()));
|
||||
@@ -175,11 +184,14 @@ impl EventHandler {
|
||||
modifiers
|
||||
);
|
||||
|
||||
// Block command mode entry from edit mode
|
||||
if let Some("enter_command_mode") = context_action {
|
||||
self.command_mode = true;
|
||||
self.command_input.clear();
|
||||
self.command_message.clear();
|
||||
return Ok((false, String::new()));
|
||||
if !self.is_edit_mode {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user