diff options
author | qkzk <qu3nt1n@gmail.com> | 2024-01-11 22:25:59 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2024-01-11 22:25:59 +0100 |
commit | 24034b80e9d146aeeb28ecfc8e440fdd39370de4 (patch) | |
tree | 7fe53578e613c629523c83fea3fe3a32aeb120ae /src/event | |
parent | ffba90deb7332985362b311cac5f6f7354c8764c (diff) |
WIP. May have to be reversed. Should I create a window kind object and send it actions ?
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/event_exec.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/event/event_exec.rs b/src/event/event_exec.rs index 05ac778..b7dcad3 100644 --- a/src/event/event_exec.rs +++ b/src/event/event_exec.rs @@ -1193,8 +1193,15 @@ impl EventAction { /// Enter action mode in which you can type any valid action. /// Some action does nothing as they require to be executed from a specific context. pub fn action(status: &mut Status) -> Result<()> { - status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Action))?; - status.menu.completion.reset(); + if matches!( + status.current_tab().edit_mode, + Edit::InputCompleted(InputCompleted::Action) + ) { + status.reset_edit_mode()?; + } else { + status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Action))?; + status.menu.completion.reset(); + } Ok(()) } |