aboutsummaryrefslogtreecommitdiff
path: root/src/app/mod.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-08 16:26:47 +0300
committerGitHub <noreply@github.com>2026-08-08 16:26:47 +0300
commit10974c822d607f03e20e9741ec027910f0c1f93a (patch)
tree85453f5ba5bcfcc56c37cabdbbced8a7e701cbe3 /src/app/mod.rs
parent1d6d1fdc6ba8a4fd0385a2071f157504871201a2 (diff)
feat(input): add per-pane right-click routing (#2504)
Diffstat (limited to 'src/app/mod.rs')
-rw-r--r--src/app/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs
index 5e3c86de..7fb8a01c 100644
--- a/src/app/mod.rs
+++ b/src/app/mod.rs
@@ -4381,6 +4381,7 @@ mod tests {
ratio: None,
cwd: None,
focus: false,
+ right_click: Default::default(),
env: Default::default(),
}),
});
@@ -4461,6 +4462,7 @@ mod tests {
ratio: None,
cwd: None,
focus: true,
+ right_click: Default::default(),
env: Default::default(),
}),
});
@@ -4507,6 +4509,7 @@ mod tests {
ratio: Some(0.333),
cwd: None,
focus: false,
+ right_click: crate::api::schema::PaneRightClickTarget::Pane,
env: Default::default(),
}),
});
@@ -4518,6 +4521,14 @@ mod tests {
.splits(ratatui::layout::Rect::new(0, 0, 100, 20));
assert_eq!(splits.len(), 1);
assert!((splits[0].ratio - 0.333).abs() < f32::EPSILON);
+ let response_pane_id = response["result"]["pane"]["pane_id"].as_str().unwrap();
+ let (_, response_pane_id) = app.parse_pane_id(response_pane_id).unwrap();
+ assert!(
+ app.state.workspaces[0]
+ .pane_state(response_pane_id)
+ .unwrap()
+ .right_click_passthrough
+ );
let runtimes: Vec<_> = app.terminal_runtimes.drain().collect();
for (_terminal_id, runtime) in runtimes {
@@ -4553,6 +4564,7 @@ mod tests {
ratio: None,
cwd: None,
focus: false,
+ right_click: Default::default(),
env: Default::default(),
}),
});