disabling modes where they shouldnt be enabled BIG UPDATE
This commit is contained in:
@@ -87,14 +87,12 @@ impl Config {
|
||||
&self,
|
||||
is_edit_mode: bool,
|
||||
command_mode: bool,
|
||||
show_general_mode: bool,
|
||||
key: KeyCode,
|
||||
modifiers: KeyModifiers
|
||||
) -> Option<&str> {
|
||||
match (show_general_mode, command_mode, is_edit_mode) {
|
||||
(true, _, _) => self.get_general_action(key, modifiers),
|
||||
(_, true, _) => self.get_command_action_for_key(key, modifiers),
|
||||
(_, _, true) => self.get_edit_action_for_key(key, modifiers)
|
||||
match (command_mode, is_edit_mode) {
|
||||
(true, _) => self.get_command_action_for_key(key, modifiers),
|
||||
(_, true) => self.get_edit_action_for_key(key, modifiers)
|
||||
.or_else(|| self.get_common_action(key, modifiers)),
|
||||
_ => self.get_read_only_action_for_key(key, modifiers)
|
||||
.or_else(|| self.get_common_action(key, modifiers))
|
||||
|
||||
Reference in New Issue
Block a user