command mode entering during edit mode is now forbidden

This commit is contained in:
filipriec
2025-02-28 21:39:27 +01:00
parent cd3c6fd71f
commit 18be34b336
3 changed files with 27 additions and 14 deletions

View File

@@ -272,6 +272,7 @@ impl Config {
}
/// Checks if a key is bound to entering Command mode.
/// This method is no longer used in event.rs since we now handle command mode entry only in read-only mode directly.
pub fn is_enter_command_mode(&self, key: KeyCode, modifiers: KeyModifiers) -> bool {
if let Some(bindings) = self.keybindings.command.get("enter_command_mode") {
bindings.iter().any(|b| Self::matches_keybinding(b, key, modifiers))
@@ -280,6 +281,7 @@ impl Config {
}
}
/// Checks if a key is bound to exiting Command mode.
pub fn is_exit_command_mode(&self, key: KeyCode, modifiers: KeyModifiers) -> bool {
if let Some(bindings) = self.keybindings.command.get("exit_command_mode") {