aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--README.md16
-rw-r--r--zellij-server/src/lib.rs4
-rw-r--r--zellij-server/src/screen.rs12
-rw-r--r--zellij-server/src/tab/mod.rs8
-rw-r--r--zellij-server/src/tab/mouse_handler.rs2
-rw-r--r--zellij-server/src/tab/unit/tab_integration_tests.rs10
-rw-r--r--zellij-server/src/tab/unit/tab_tests.rs3
-rw-r--r--zellij-server/src/unit/screen_tests.rs5
-rw-r--r--zellij-utils/src/input/options.rs13
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs2
-rw-r--r--zellij-utils/src/ipc/tests/roundtrip_tests.rs5
-rw-r--r--zellij-utils/src/kdl/mod.rs34
-rw-r--r--zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap5
-rw-r--r--zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap5
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap2
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap2
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap2
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap1
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap1
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap1
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap2
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap1
-rw-r--r--zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap1
23 files changed, 136 insertions, 1 deletions
diff --git a/README.md b/README.md
index 13acfaae..8c4149c7 100644
--- a/README.md
+++ b/README.md
@@ -317,6 +317,22 @@ without refreshing the `insta` snapshots. If you change anything about how frame
pane titles render, expect to regenerate snapshots — and read the diffs before
accepting them.
+### `mouse_hover_help_text`
+
+```kdl
+mouse_hover_help_text false // default: true
+```
+
+Hovering a pane shows `Ctrl <MouseScroll> or <drag borders> to resize`. Upstream
+governs that with `mouse_hover_effects`, which **also** controls the hover frame
+highlight — so silencing the hint costs you the highlight too. This separates
+them: the hint is a beginner reminder you outgrow, the highlight stays useful.
+
+Config-file only. It has no protobuf slot, so it does not cross the client/server
+IPC contract — the server reads it from the config file itself, and `merge()`
+keeps the file value when the client sends `None`. A `--mouse-hover-help-text`
+CLI flag would therefore be silently ignored.
+
### `close_if_focused` on `LaunchOrFocusPlugin`
Makes one chord both open and dismiss a plugin:
diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs
index 02b2a87c..92d4a2c2 100644
--- a/zellij-server/src/lib.rs
+++ b/zellij-server/src/lib.rs
@@ -479,6 +479,10 @@ impl SessionMetaData {
.unwrap_or(true),
mouse_scroll_resize: new_config.options.mouse_scroll_resize.unwrap_or(true),
mouse_hover_effects: new_config.options.mouse_hover_effects.unwrap_or(true),
+ mouse_hover_help_text: new_config
+ .options
+ .mouse_hover_help_text
+ .unwrap_or(true),
visual_bell: new_config.options.visual_bell.unwrap_or(true),
focus_follows_mouse: new_config.options.focus_follows_mouse.unwrap_or(false),
mouse_click_through: new_config.options.mouse_click_through.unwrap_or(false),
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index a5d0fd30..1edf5edf 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -795,6 +795,7 @@ pub enum ScreenInstruction {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ mouse_hover_help_text: bool,
visual_bell: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
@@ -1560,6 +1561,7 @@ pub(crate) struct Screen {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ mouse_hover_help_text: bool,
visual_bell: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
@@ -1682,6 +1684,7 @@ impl Screen {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ mouse_hover_help_text: bool,
visual_bell: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
@@ -1754,6 +1757,7 @@ impl Screen {
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
@@ -4514,6 +4518,7 @@ impl Screen {
self.advanced_mouse_actions,
self.mouse_scroll_resize,
self.mouse_hover_effects,
+ self.mouse_hover_help_text,
self.focus_follows_mouse,
self.mouse_click_through,
self.web_server_ip,
@@ -6360,6 +6365,7 @@ impl Screen {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ mouse_hover_help_text: bool,
visual_bell: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
@@ -6387,6 +6393,7 @@ impl Screen {
self.advanced_mouse_actions = advanced_mouse_actions;
self.mouse_scroll_resize = mouse_scroll_resize;
self.mouse_hover_effects = mouse_hover_effects;
+ self.mouse_hover_help_text = mouse_hover_help_text;
self.visual_bell = visual_bell;
self.focus_follows_mouse = focus_follows_mouse;
self.mouse_click_through = mouse_click_through;
@@ -6435,6 +6442,7 @@ impl Screen {
tab.update_advanced_mouse_actions(advanced_mouse_actions);
tab.update_mouse_scroll_resize(mouse_scroll_resize);
tab.update_mouse_hover_effects(mouse_hover_effects);
+ tab.update_mouse_hover_help_text(mouse_hover_help_text);
tab.update_focus_follows_mouse(focus_follows_mouse);
tab.update_mouse_click_through(mouse_click_through);
tab.sync_stacked_pane_list_mode();
@@ -7589,6 +7597,7 @@ pub(crate) fn screen_thread_main(
let advanced_mouse_actions = config_options.advanced_mouse_actions.unwrap_or(true);
let mouse_scroll_resize = config_options.mouse_scroll_resize.unwrap_or(true);
let mouse_hover_effects = config_options.mouse_hover_effects.unwrap_or(true);
+ let mouse_hover_help_text = config_options.mouse_hover_help_text.unwrap_or(true);
let visual_bell = config_options.visual_bell.unwrap_or(true);
let focus_follows_mouse = config_options.focus_follows_mouse.unwrap_or(false);
let mouse_click_through = config_options.mouse_click_through.unwrap_or(false);
@@ -7634,6 +7643,7 @@ pub(crate) fn screen_thread_main(
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
@@ -10995,6 +11005,7 @@ pub(crate) fn screen_thread_main(
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
@@ -11033,6 +11044,7 @@ pub(crate) fn screen_thread_main(
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 7cda7506..f5c30853 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -368,6 +368,9 @@ pub(crate) struct Tab {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ /// Whether hovering shows the resize hint. Separate from mouse_hover_effects
+ /// so the hint can be dropped without losing the hover frame highlight.
+ mouse_hover_help_text: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
/// Repeated clicks on pane FRAMES, per client. Separate from the grid's own
@@ -1062,6 +1065,7 @@ impl Tab {
advanced_mouse_actions: bool,
mouse_scroll_resize: bool,
mouse_hover_effects: bool,
+ mouse_hover_help_text: bool,
focus_follows_mouse: bool,
mouse_click_through: bool,
web_server_ip: IpAddr,
@@ -1203,6 +1207,7 @@ impl Tab {
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
focus_follows_mouse,
mouse_click_through,
frame_clicks: HashMap::new(),
@@ -8049,6 +8054,9 @@ impl Tab {
pub fn update_mouse_scroll_resize(&mut self, mouse_scroll_resize: bool) {
self.mouse_scroll_resize = mouse_scroll_resize;
}
+ pub fn update_mouse_hover_help_text(&mut self, mouse_hover_help_text: bool) {
+ self.mouse_hover_help_text = mouse_hover_help_text;
+ }
pub fn update_mouse_hover_effects(&mut self, mouse_hover_effects: bool) {
self.mouse_hover_effects = mouse_hover_effects;
}
diff --git a/zellij-server/src/tab/mouse_handler.rs b/zellij-server/src/tab/mouse_handler.rs
index 5e8c38e5..b91ae67a 100644
--- a/zellij-server/src/tab/mouse_handler.rs
+++ b/zellij-server/src/tab/mouse_handler.rs
@@ -1452,7 +1452,7 @@ impl MouseHandler {
.insert(client_id, Instant::now());
let entered_pane = tab.mouse_last_pane_id.get(&client_id) != Some(&pane_id);
tab.mouse_last_pane_id.insert(client_id, pane_id);
- if entered_pane {
+ if entered_pane && tab.mouse_hover_help_text {
let was_visible = tab
.mouse_help_text_visible
.get(&client_id)
diff --git a/zellij-server/src/tab/unit/tab_integration_tests.rs b/zellij-server/src/tab/unit/tab_integration_tests.rs
index eb1df250..47c894bc 100644
--- a/zellij-server/src/tab/unit/tab_integration_tests.rs
+++ b/zellij-server/src/tab/unit/tab_integration_tests.rs
@@ -279,6 +279,7 @@ fn create_new_tab(size: Size, default_mode: ModeInfo) -> Tab {
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -377,6 +378,7 @@ fn create_new_tab_with_stacked_pane_list(
advanced_mouse_actions,
mouse_scroll_resize,
true,
+ true, // mouse_hover_help_text
false,
false,
web_server_ip,
@@ -471,6 +473,7 @@ fn create_new_tab_without_pane_frames(size: Size, default_mode: ModeInfo) -> Tab
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -582,6 +585,7 @@ fn create_new_tab_with_swap_layouts(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -690,6 +694,7 @@ fn create_new_tab_with_os_api(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -784,6 +789,7 @@ fn create_new_tab_with_layout(size: Size, default_mode: ModeInfo, layout: &str)
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -892,6 +898,7 @@ fn create_new_tab_with_mock_pty_writer(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -991,6 +998,7 @@ fn create_new_tab_with_sixel_support(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -13363,6 +13371,7 @@ fn create_new_tab_with_plugin_receiver(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -15151,6 +15160,7 @@ fn create_new_tab_with_server_receiver(
true, // advanced_mouse_actions
true, // mouse_scroll_resize
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)),
diff --git a/zellij-server/src/tab/unit/tab_tests.rs b/zellij-server/src/tab/unit/tab_tests.rs
index a3713739..65354069 100644
--- a/zellij-server/src/tab/unit/tab_tests.rs
+++ b/zellij-server/src/tab/unit/tab_tests.rs
@@ -221,6 +221,7 @@ fn create_new_tab(size: Size, stacked_resize: bool) -> Tab {
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -312,6 +313,7 @@ fn create_new_tab_with_layout(size: Size, layout: TiledPaneLayout) -> Tab {
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
@@ -409,6 +411,7 @@ fn create_new_tab_with_cell_size(
advanced_mouse_actions,
mouse_scroll_resize,
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
false, // focus_follows_mouse
false, // mouse_click_through
web_server_ip,
diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs
index 87b4af2c..90e21f3e 100644
--- a/zellij-server/src/unit/screen_tests.rs
+++ b/zellij-server/src/unit/screen_tests.rs
@@ -324,6 +324,7 @@ fn create_new_screen_with_kitty_graphics(
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ true, // mouse_hover_help_text
visual_bell,
false, // focus_follows_mouse
false, // mouse_click_through
@@ -5537,6 +5538,7 @@ fn create_new_screen_with_message_capture(
true,
true,
true,
+ true, // mouse_hover_help_text
visual_bell,
false, // focus_follows_mouse
false, // mouse_click_through
@@ -8640,6 +8642,7 @@ fn create_new_screen_with_forward_capture(size: Size) -> (Screen, ForwardCapture
true,
true,
true,
+ true, // mouse_hover_help_text
visual_bell,
false, // focus_follows_mouse
false, // mouse_click_through
@@ -9318,6 +9321,7 @@ fn create_new_screen_with_theme_capture(size: Size) -> (Screen, ThemeCapture) {
true,
true,
true,
+ true, // mouse_hover_help_text
true,
false,
false,
@@ -9853,6 +9857,7 @@ fn create_non_mirrored_screen(size: Size) -> Screen {
true, // advanced_mouse_actions
true, // mouse_scroll_resize
true, // mouse_hover_effects
+ true, // mouse_hover_help_text
true, // visual_bell
false, // focus_follows_mouse
false, // mouse_click_through
diff --git a/zellij-utils/src/input/options.rs b/zellij-utils/src/input/options.rs
index 5937237f..b4621c13 100644
--- a/zellij-utils/src/input/options.rs
+++ b/zellij-utils/src/input/options.rs
@@ -400,6 +400,15 @@ pub struct Options {
#[serde(default)]
pub mouse_hover_effects: Option<bool>,
+ /// Whether hovering a pane shows the "Ctrl <MouseScroll> or <drag borders> to
+ /// resize" hint. Split out from mouse_hover_effects, which also governs the
+ /// hover frame highlight: the hint is a beginner reminder you outgrow, while
+ /// the highlight is useful indefinitely.
+ /// default is true
+ #[clap(long, value_parser)]
+ #[serde(default)]
+ pub mouse_hover_help_text: Option<bool>,
+
/// Whether to show visual bell indicators (pane/tab frame flash and [!] suffix)
/// default is true
#[clap(long, value_parser)]
@@ -552,6 +561,7 @@ impl Options {
let advanced_mouse_actions = other.advanced_mouse_actions.or(self.advanced_mouse_actions);
let mouse_scroll_resize = other.mouse_scroll_resize.or(self.mouse_scroll_resize);
let mouse_hover_effects = other.mouse_hover_effects.or(self.mouse_hover_effects);
+ let mouse_hover_help_text = other.mouse_hover_help_text.or(self.mouse_hover_help_text);
let visual_bell = other.visual_bell.or(self.visual_bell);
let focus_follows_mouse = other.focus_follows_mouse.or(self.focus_follows_mouse);
let mouse_click_through = other.mouse_click_through.or(self.mouse_click_through);
@@ -619,6 +629,7 @@ impl Options {
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
@@ -707,6 +718,7 @@ impl Options {
let advanced_mouse_actions = other.advanced_mouse_actions.or(self.advanced_mouse_actions);
let mouse_scroll_resize = other.mouse_scroll_resize.or(self.mouse_scroll_resize);
let mouse_hover_effects = other.mouse_hover_effects.or(self.mouse_hover_effects);
+ let mouse_hover_help_text = other.mouse_hover_help_text.or(self.mouse_hover_help_text);
let visual_bell = other.visual_bell.or(self.visual_bell);
let focus_follows_mouse = merge_bool(other.focus_follows_mouse, self.focus_follows_mouse);
let mouse_click_through = merge_bool(other.mouse_click_through, self.mouse_click_through);
@@ -774,6 +786,7 @@ impl Options {
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
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),
diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs
index b2b576dc..88ea7dbe 100644
--- a/zellij-utils/src/kdl/mod.rs
+++ b/zellij-utils/src/kdl/mod.rs
@@ -2885,6 +2885,9 @@ impl Options {
let mouse_hover_effects =
kdl_property_first_arg_as_bool_or_error!(kdl_options, "mouse_hover_effects")
.map(|(v, _)| v);
+ let mouse_hover_help_text =
+ kdl_property_first_arg_as_bool_or_error!(kdl_options, "mouse_hover_help_text")
+ .map(|(v, _)| v);
let web_server_ip =
match kdl_property_first_arg_as_string_or_error!(kdl_options, "web_server_ip") {
Some((string, entry)) => Some(IpAddr::from_str(string).map_err(|_| {
@@ -3022,6 +3025,7 @@ impl Options {
advanced_mouse_actions,
mouse_scroll_resize,
mouse_hover_effects,
+ mouse_hover_help_text,
visual_bell,
focus_follows_mouse,
mouse_click_through,
@@ -4308,6 +4312,33 @@ impl Options {
None
}
}
+ fn mouse_hover_help_text_to_kdl(&self, add_comments: bool) -> Option<KdlNode> {
+ let comment_text = format!(
+ "{}\n{}\n{}",
+ " ",
+ "// Whether hovering a pane shows the \"Ctrl <MouseScroll> or <drag borders> to resize\" hint",
+ "// default is true",
+ );
+
+ let create_node = |node_value: bool| -> KdlNode {
+ let mut node = KdlNode::new("mouse_hover_help_text");
+ node.push(KdlValue::Bool(node_value));
+ node
+ };
+ if let Some(mouse_hover_help_text) = self.mouse_hover_help_text {
+ let mut node = create_node(mouse_hover_help_text);
+ if add_comments {
+ node.set_leading(format!("{}\n", comment_text));
+ }
+ Some(node)
+ } else if add_comments {
+ let mut node = create_node(false);
+ node.set_leading(format!("{}\n// ", comment_text));
+ Some(node)
+ } else {
+ None
+ }
+ }
fn mouse_hover_effects_to_kdl(&self, add_comments: bool) -> Option<KdlNode> {
let comment_text = format!(
"{}\n{}\n{}",
@@ -4794,6 +4825,9 @@ impl Options {
if let Some(mouse_hover_effects) = self.mouse_hover_effects_to_kdl(add_comments) {
nodes.push(mouse_hover_effects);
}
+ if let Some(mouse_hover_help_text) = self.mouse_hover_help_text_to_kdl(add_comments) {
+ nodes.push(mouse_hover_help_text);
+ }
if let Some(visual_bell) = self.visual_bell_to_kdl(add_comments) {
nodes.push(visual_bell);
}
diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap
index 1311a824..8413e638 100644
--- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap
+++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/kdl/mod.rs
+assertion_line: 8001
expression: fake_config_stringified
---
keybinds clear-defaults=true {
@@ -574,6 +575,10 @@ web_client {
// default is true
// mouse_hover_effects false
+// Whether hovering a pane shows the "Ctrl <MouseScroll> or <drag borders> to resize" hint
+// default is true
+// mouse_hover_help_text false
+
// Whether to show visual bell indicators (pane/tab frame flash and [!] suffix)
// default is true
// visual_bell true
diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap
index 2e9364b1..5c694d96 100644
--- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap
+++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/kdl/mod.rs
+assertion_line: 7877
expression: fake_document.to_string()
---
@@ -288,6 +289,10 @@ web_sharing "disabled"
// default is true
// mouse_hover_effects false
+// Whether hovering a pane shows the "Ctrl <MouseScroll> or <drag borders> to resize" hint
+// default is true
+// mouse_hover_help_text false
+
// Whether to show visual bell indicators (pane/tab frame flash and [!] suffix)
// default is true
// visual_bell true
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap
index 782d4644..2bb77aeb 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/setup.rs
+assertion_line: 703
expression: "format!(\"{:#?}\", options)"
---
Options {
@@ -46,6 +47,7 @@ Options {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap
index fc82f281..fd2ced24 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/setup.rs
+assertion_line: 737
expression: "format!(\"{:#?}\", options)"
---
Options {
@@ -46,6 +47,7 @@ Options {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap
index 16e628ed..c351948f 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/setup.rs
+assertion_line: 693
expression: "format!(\"{:#?}\", options)"
---
Options {
@@ -44,6 +45,7 @@ Options {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
index ba0a450f..56798240 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
@@ -6076,6 +6076,7 @@ Config {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
index c1aade01..1541d678 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap
@@ -6076,6 +6076,7 @@ Config {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap
index 692ffc41..126a7274 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap
@@ -132,6 +132,7 @@ Config {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap
index da4f16b6..6716af69 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap
@@ -1,5 +1,6 @@
---
source: zellij-utils/src/setup.rs
+assertion_line: 713
expression: "format!(\"{:#?}\", options)"
---
Options {
@@ -46,6 +47,7 @@ Options {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
index e39b5a54..a83dd9f6 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap
@@ -6076,6 +6076,7 @@ Config {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,
diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
index 515d46b1..79f1c716 100644
--- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
+++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap
@@ -6076,6 +6076,7 @@ Config {
advanced_mouse_actions: None,
mouse_scroll_resize: None,
mouse_hover_effects: None,
+ mouse_hover_help_text: None,
visual_bell: None,
focus_follows_mouse: None,
mouse_click_through: None,