aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/mod.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-03-23 18:25:31 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-04 20:47:52 +0530
commitbbcea3198892cb005d551a4c3b90c1f02712ace7 (patch)
treeecdb346c3bc699d010d0d939749973ebef4ca21c /src/common/mod.rs
parentHide IpcChannel entirely behind OsApi (diff)
downloadsl0ppij-bbcea3198892cb005d551a4c3b90c1f02712ace7.tar.gz
sl0ppij-bbcea3198892cb005d551a4c3b90c1f02712ace7.tar.xz
sl0ppij-bbcea3198892cb005d551a4c3b90c1f02712ace7.zip
Synchronize update tabs actions using command_is_executing
Diffstat (limited to 'src/common/mod.rs')
-rw-r--r--src/common/mod.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/common/mod.rs b/src/common/mod.rs
index 9cafb5d6..8bff832e 100644
--- a/src/common/mod.rs
+++ b/src/common/mod.rs
@@ -386,22 +386,31 @@ pub fn start(
}
ScreenInstruction::NewTab(pane_id) => {
screen.new_tab(pane_id);
- command_is_executing.done_opening_new_pane();
+ command_is_executing.done_updating_tabs();
+ }
+ ScreenInstruction::SwitchTabNext => {
+ screen.switch_tab_next();
+ command_is_executing.done_updating_tabs();
+ }
+ ScreenInstruction::SwitchTabPrev => {
+ screen.switch_tab_prev();
+ command_is_executing.done_updating_tabs();
}
- ScreenInstruction::SwitchTabNext => screen.switch_tab_next(),
- ScreenInstruction::SwitchTabPrev => screen.switch_tab_prev(),
ScreenInstruction::CloseTab => {
screen.close_tab();
+ command_is_executing.done_updating_tabs();
}
ScreenInstruction::ApplyLayout((layout, new_pane_pids)) => {
screen.apply_layout(Layout::new(layout), new_pane_pids);
command_is_executing.done_opening_new_pane();
}
ScreenInstruction::GoToTab(tab_index) => {
- screen.go_to_tab(tab_index as usize)
+ screen.go_to_tab(tab_index as usize);
+ command_is_executing.done_updating_tabs();
}
ScreenInstruction::UpdateTabName(c) => {
screen.update_active_tab_name(c);
+ command_is_executing.done_updating_tabs();
}
ScreenInstruction::Exit => {
break;