diff options
| author | denis <denismaximov98@gmail.com> | 2021-03-24 07:50:47 +0200 |
|---|---|---|
| committer | denis <denismaximov98@gmail.com> | 2021-03-24 07:50:47 +0200 |
| commit | 91608dfe4ea3e75853d4966d7f464d85c022beef (patch) | |
| tree | 1902f249409182d378c61a93858ed1d346025111 /src/common | |
| parent | wip: remove colored_borders (diff) | |
| download | sl0ppij-91608dfe4ea3e75853d4966d7f464d85c022beef.tar.gz sl0ppij-91608dfe4ea3e75853d4966d7f464d85c022beef.tar.xz sl0ppij-91608dfe4ea3e75853d4966d7f464d85c022beef.zip | |
wip: cleanup the TabData, get rid of input_mode in tab, pass through render instead
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/screen.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/common/screen.rs b/src/common/screen.rs index a074b300..1decb739 100644 --- a/src/common/screen.rs +++ b/src/common/screen.rs @@ -119,7 +119,6 @@ impl Screen { self.send_app_instructions.clone(), self.max_panes, Some(PaneId::Terminal(pane_id)), - self.input_mode, ); self.active_tab_index = Some(tab_index); self.tabs.insert(tab_index, tab); @@ -218,9 +217,10 @@ impl Screen { /// Renders this [`Screen`], which amounts to rendering its active [`Tab`]. pub fn render(&mut self) { + let input_mode = self.input_mode; if let Some(active_tab) = self.get_active_tab_mut() { if active_tab.get_active_pane().is_some() { - active_tab.render(); + active_tab.render(Some(input_mode)); } else { self.close_tab(); } @@ -264,7 +264,6 @@ impl Screen { self.send_app_instructions.clone(), self.max_panes, None, - self.input_mode, ); tab.apply_layout(layout, new_pids); self.active_tab_index = Some(tab_index); @@ -280,7 +279,6 @@ impl Screen { position: tab.position, name: tab.name.clone(), active: active_tab_index == tab.index, - input_mode: self.input_mode, }); } self.send_plugin_instructions @@ -312,8 +310,5 @@ impl Screen { } pub fn change_input_mode(&mut self, input_mode: InputMode) { self.input_mode = input_mode; - for tab in self.tabs.values_mut() { - tab.input_mode = self.input_mode; - } } } |
