aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Linford <tlinford@users.noreply.github.com>2022-05-02 22:06:47 +0200
committerGitHub <noreply@github.com>2022-05-02 22:06:47 +0200
commitbfa4942c5ba9f4a4c05ff3f4f197ab82f9ea3f44 (patch)
tree0aee124fd51e3bda384d11cbc540e6b2bdef3b40
parentchore(version): bump development version (diff)
downloadsl0ppij-bfa4942c5ba9f4a4c05ff3f4f197ab82f9ea3f44.tar.gz
sl0ppij-bfa4942c5ba9f4a4c05ff3f4f197ab82f9ea3f44.tar.xz
sl0ppij-bfa4942c5ba9f4a4c05ff3f4f197ab82f9ea3f44.zip
fix(mouse): mouse events not forwarded to plugin panes (#1369)
* fix mouse click and release events not forwarded to plugin panes
-rw-r--r--zellij-server/src/tab/mod.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 9f9d4d4e..7b5bd808 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -1549,9 +1549,12 @@ impl Tab {
relative_position.line.0 + 1
);
self.write_to_active_terminal(mouse_event.into_bytes(), client_id);
- } else if let PaneId::Terminal(_) = pane.pid() {
+ } else {
+ // TODO: rename this method, it is used to forward click events to plugin panes
pane.start_selection(&relative_position, client_id);
- self.selecting_with_mouse = true;
+ if let PaneId::Terminal(_) = pane.pid() {
+ self.selecting_with_mouse = true;
+ }
}
};
}
@@ -1617,9 +1620,10 @@ impl Tab {
.min(active_pane.get_content_rows() as isize);
let mouse_event = format!("\u{1b}[<0;{:?};{:?}m", col, line);
self.write_to_active_terminal(mouse_event.into_bytes(), client_id);
- } else if selecting {
+ } else {
+ // TODO: rename this method, it is used to forward release events to plugin panes
active_pane.end_selection(&relative_position, client_id);
- if copy_on_release {
+ if selecting && copy_on_release {
let selected_text = active_pane.get_selected_text();
active_pane.reset_selection();