summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/route.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-08-17 09:28:51 +0200
committerGitHub <noreply@github.com>2022-08-17 09:28:51 +0200
commitf4ad946497264dbe8339f50b2e9ef0cf90a2024c (patch)
tree1a53e6f56d1a8b491457266fadc1d93f118be6b2 /zellij-server/src/route.rs
parentb53e3807eb682ba395a7c4f31ace42d67dca5d88 (diff)
fix(terminal): SGR/UTF8 mouse reporting in terminal panes (#1664)
* work * work * fix: selection mishandling * style(fmt): rustfmt * style(comments): remove outdated * style(clippy): make clippy happy * fix(mouse): off by one sgr/utf8 reporting * style(fmt): rustfmt * fix(mouse): correctly report drag event code * fix(input): support mouse middle click * style(fmt): rustfmt
Diffstat (limited to 'zellij-server/src/route.rs')
-rw-r--r--zellij-server/src/route.rs41
1 files changed, 35 insertions, 6 deletions
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs
index 81b1fe047..92b8f9c91 100644
--- a/zellij-server/src/route.rs
+++ b/zellij-server/src/route.rs
@@ -33,7 +33,7 @@ fn route_action(
// this is a bit of a hack around the unfortunate architecture we use with plugins
// this will change as soon as we refactor
match action {
- Action::MouseHold(_) => {},
+ Action::MouseHoldLeft(..) | Action::MouseHoldRight(..) => {},
_ => {
session
.senders
@@ -376,17 +376,46 @@ fn route_action(
.send_to_screen(ScreenInstruction::RightClick(point, client_id))
.unwrap();
},
-
- Action::MouseRelease(point) => {
+ Action::MiddleClick(point) => {
+ session
+ .senders
+ .send_to_screen(ScreenInstruction::MiddleClick(point, client_id))
+ .unwrap();
+ },
+ Action::LeftMouseRelease(point) => {
+ session
+ .senders
+ .send_to_screen(ScreenInstruction::LeftMouseRelease(point, client_id))
+ .unwrap();
+ },
+ Action::RightMouseRelease(point) => {
+ session
+ .senders
+ .send_to_screen(ScreenInstruction::RightMouseRelease(point, client_id))
+ .unwrap();
+ },
+ Action::MiddleMouseRelease(point) => {
+ session
+ .senders
+ .send_to_screen(ScreenInstruction::MiddleMouseRelease(point, client_id))
+ .unwrap();
+ },
+ Action::MouseHoldLeft(point) => {
+ session
+ .senders
+ .send_to_screen(ScreenInstruction::MouseHoldLeft(point, client_id))
+ .unwrap();
+ },
+ Action::MouseHoldRight(point) => {
session
.senders
- .send_to_screen(ScreenInstruction::MouseRelease(point, client_id))
+ .send_to_screen(ScreenInstruction::MouseHoldRight(point, client_id))
.unwrap();
},
- Action::MouseHold(point) => {
+ Action::MouseHoldMiddle(point) => {
session
.senders
- .send_to_screen(ScreenInstruction::MouseHold(point, client_id))
+ .send_to_screen(ScreenInstruction::MouseHoldMiddle(point, client_id))
.unwrap();
},
Action::Copy => {