aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/ipc
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-12 14:09:21 +0200
committeruser <user@clank>2026-08-12 14:09:21 +0200
commitea500ea70aa77da57870e8272bab593887819b0b (patch)
tree9e73592f03884dba54c3ff1ab3b5ab41cb9721d6 /zellij-utils/src/ipc
parentsl0p(pane-finder): find panes hidden in a stack, not just the visible one (diff)
downloadsl0ppij-ea500ea70aa77da57870e8272bab593887819b0b.tar.gz
sl0ppij-ea500ea70aa77da57870e8272bab593887819b0b.tar.xz
sl0ppij-ea500ea70aa77da57870e8272bab593887819b0b.zip
sl0p: separate the hover resize hint from the hover highlight
Upstream's mouse_hover_effects governs two unrelated things: the frame highlight on hover, and the "Ctrl <MouseScroll> or <drag borders> to resize" hint. Its own comment in default.kdl admits as much. So silencing a beginner reminder you have outgrown also costs you a highlight that stays useful indefinitely. mouse_hover_help_text (default true) gates only the hint. One line in execute_send_to_terminal; the highlight is set in execute_update_hover and is untouched. Config-file only, deliberately. The option has no protobuf slot, so it does not cross the client/server IPC contract -- the roundtrip test asserts exactly that, with the fixture set to None and a comment explaining why. It still works from the config file because the server parses the file itself and Options::merge keeps the file value when the client sends None; a CLI flag would be silently ignored.
Diffstat (limited to 'zellij-utils/src/ipc')
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs2
-rw-r--r--zellij-utils/src/ipc/tests/roundtrip_tests.rs5
2 files changed, 7 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs
index c3cf4d8d..26c78f97 100644
--- a/zellij-utils/src/ipc/protobuf_conversion.rs
+++ b/zellij-utils/src/ipc/protobuf_conversion.rs
@@ -912,6 +912,8 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Options>
advanced_mouse_actions: options.advanced_mouse_actions,
mouse_scroll_resize: options.mouse_scroll_resize,
mouse_hover_effects: options.mouse_hover_effects,
+ // no protobuf slot; a config-only option
+ mouse_hover_help_text: None,
web_server_ip: options
.web_server_ip
.map(|ip| ip.parse())
diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
index fb952d05..a9eadf05 100644
--- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs
+++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
@@ -494,6 +494,11 @@ fn test_client_messages() {
post_command_discovery_hook: Some("post_command_discovery_hook".to_owned()),
client_async_worker_tasks: Some(16),
mouse_hover_effects: Some(false),
+ // Deliberately None: mouse_hover_help_text has no protobuf slot,
+ // so it does not cross this contract. The server reads it from the
+ // config file itself and merge() keeps the file value when the
+ // client sends None -- so config works, a CLI flag would not.
+ mouse_hover_help_text: None,
visual_bell: Some(true),
focus_follows_mouse: Some(false),
mouse_click_through: Some(false),