diff options
| author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-04-28 21:13:19 +0530 |
|---|---|---|
| committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-04 20:48:16 +0530 |
| commit | 42079f8d048fc2ec4dad9b135efb93e31cf2ecb6 (patch) | |
| tree | 0b976b61742f205601d44d68cdc269f50acb62d2 /src/common/input | |
| parent | Use interprocess crate for IPC (diff) | |
| download | sl0ppij-42079f8d048fc2ec4dad9b135efb93e31cf2ecb6.tar.gz sl0ppij-42079f8d048fc2ec4dad9b135efb93e31cf2ecb6.tar.xz sl0ppij-42079f8d048fc2ec4dad9b135efb93e31cf2ecb6.zip | |
Refactor CommandIsExecuting to have a single variant
Diffstat (limited to 'src/common/input')
| -rw-r--r-- | src/common/input/handler.rs | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index 509b77fa..64e4fbe3 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -114,27 +114,18 @@ impl InputHandler { self.os_input .send_to_server(ServerInstruction::Action(action.clone())); } - Action::NewPane(_) => { - self.command_is_executing.opening_new_pane(); - self.os_input - .send_to_server(ServerInstruction::Action(action)); - self.command_is_executing.wait_until_new_pane_is_opened(); - } - Action::CloseFocus => { - self.command_is_executing.closing_pane(); - self.os_input - .send_to_server(ServerInstruction::Action(action)); - self.command_is_executing.wait_until_pane_is_closed(); - } - Action::NewTab + Action::CloseFocus + | Action::NewPane(_) + | Action::NewTab | Action::GoToNextTab | Action::GoToPreviousTab | Action::CloseTab | Action::GoToTab(_) => { - self.command_is_executing.updating_tabs(); + self.command_is_executing.blocking_input_thread(); self.os_input .send_to_server(ServerInstruction::Action(action)); - self.command_is_executing.wait_until_tabs_are_updated(); + self.command_is_executing + .wait_until_input_thread_is_unblocked(); } _ => self .os_input |
