aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/ipc/tests/roundtrip_tests.rs
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-12 13:16:00 +0200
committeruser <user@clank>2026-08-12 13:16:00 +0200
commit733ac78ca77cc61b52bb627e4c02eafa80282944 (patch)
treef553706a88fa05f8f1ade8efb39b5475ded160d3 /zellij-utils/src/ipc/tests/roundtrip_tests.rs
parentsl0p(pane-finder): document a single-chord binding (diff)
downloadsl0ppij-733ac78ca77cc61b52bb627e4c02eafa80282944.tar.gz
sl0ppij-733ac78ca77cc61b52bb627e4c02eafa80282944.tar.xz
sl0ppij-733ac78ca77cc61b52bb627e4c02eafa80282944.zip
sl0p: add close_if_focused to LaunchOrFocusPlugin
Upstream's action focuses an already-running plugin, so a chord bound to it can only ever open one -- there is no way to dismiss with the same key. This cannot be fixed in a plugin. Keybindings are resolved into actions in route.rs before a key reaches a pane, so the launching chord never arrives at the plugin. intercept_key_presses does not help either: the intercept lives in screen.rs and only sees keys that already became Action::Write, i.e. keys destined for a pane. Confirmed empirically -- an intercepting build received Ctrl-u but never Ctrl-;. Closes only when the plugin is the focused pane in the client's ACTIVE tab, so the chord cannot close whatever pane the user happens to be on. A plugin that exists but is hidden behind a floating-layer toggle, or is focused in a different tab, is revealed or brought over as before. Defaults to false, so every existing binding is unaffected. Config-only, with no protobuf representation: defaulted at both boundaries and dropped when an action crosses the plugin API, so no prost regeneration is needed. The 24 snapshot lines are the new field appearing in serialised keybind dumps.
Diffstat (limited to 'zellij-utils/src/ipc/tests/roundtrip_tests.rs')
-rw-r--r--zellij-utils/src/ipc/tests/roundtrip_tests.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
index 588b465e..fb952d05 100644
--- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs
+++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
@@ -2378,6 +2378,7 @@ fn test_client_messages() {
close_replaced_pane: false,
skip_cache: true,
tab_id: None,
+ close_if_focused: false,
},
terminal_id: Some(1),
client_id: Some(100),
@@ -2392,6 +2393,7 @@ fn test_client_messages() {
close_replaced_pane: false,
skip_cache: false,
tab_id: None,
+ close_if_focused: false,
},
terminal_id: Some(1),
client_id: Some(100),
@@ -2750,6 +2752,7 @@ fn test_client_messages() {
close_replaced_pane: false,
skip_cache: false,
tab_id: Some(2),
+ close_if_focused: false,
},
terminal_id: Some(1),
client_id: Some(100),