diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-12-06 22:29:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 22:29:57 +0100 |
commit | b1ab4eac1041db4b550bb51eb0801500b39fa683 (patch) | |
tree | c2bde6be7735f46392991436a55dda97f115e0cd /zellij-server/src/panes | |
parent | a6f775629632ad4dc03783901dc96057eab80eb8 (diff) |
refactor(messaging): reduce extraneous cross-thread messaging (#1996)
* refactor(messaging): reduce extraneous cross-thread messaging
* style(fmt): rustfmt
Diffstat (limited to 'zellij-server/src/panes')
-rw-r--r-- | zellij-server/src/panes/plugin_pane.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/zellij-server/src/panes/plugin_pane.rs b/zellij-server/src/panes/plugin_pane.rs index 30624d053..a530b20b2 100644 --- a/zellij-server/src/panes/plugin_pane.rs +++ b/zellij-server/src/panes/plugin_pane.rs @@ -378,20 +378,20 @@ impl Pane for PluginPane { } fn scroll_up(&mut self, count: usize, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::ScrollUp(count)), - )) + )])) .unwrap(); } fn scroll_down(&mut self, count: usize, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::ScrollDown(count)), - )) + )])) .unwrap(); } fn clear_scroll(&mut self) { @@ -399,29 +399,29 @@ impl Pane for PluginPane { } fn start_selection(&mut self, start: &Position, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::LeftClick(start.line.0, start.column.0)), - )) + )])) .unwrap(); } fn update_selection(&mut self, position: &Position, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::Hold(position.line.0, position.column.0)), - )) + )])) .unwrap(); } fn end_selection(&mut self, end: &Position, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::Release(end.line(), end.column())), - )) + )])) .unwrap(); } fn is_scrolled(&self) -> bool { @@ -462,11 +462,11 @@ impl Pane for PluginPane { } fn handle_right_click(&mut self, to: &Position, client_id: ClientId) { self.send_plugin_instructions - .send(PluginInstruction::Update( + .send(PluginInstruction::Update(vec![( Some(self.pid), Some(client_id), Event::Mouse(Mouse::RightClick(to.line.0, to.column.0)), - )) + )])) .unwrap(); } } |