From 1b56601630c8de3825f18b37cfb4988ba87127f9 Mon Sep 17 00:00:00 2001 From: akbash Date: Thu, 20 Aug 2026 02:07:16 +0300 Subject: fix: honor mouse capture config in terminal attach (#2995) refs #2992 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- src/client/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/mod.rs b/src/client/mod.rs index c33157fb..27a2e9c4 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -348,11 +348,11 @@ fn setup_terminal(mouse_capture: bool) -> io::Result { /// Sets up a direct attach terminal. /// -/// Direct attach forwards stdin to the attached PTY. It enables mouse capture -/// so wheel events can drive the attached viewport or be forwarded to child +/// Direct attach forwards stdin to the attached PTY. When configured, mouse +/// capture lets wheel events drive the attached viewport or reach child /// programs that requested mouse input. -fn setup_direct_attach_terminal() -> io::Result { - setup_terminal_with_capabilities(false, true) +fn setup_direct_attach_terminal(mouse_capture: bool) -> io::Result { + setup_terminal_with_capabilities(false, mouse_capture) } fn setup_terminal_with_capabilities( @@ -1284,7 +1284,7 @@ fn run_client_with_mode( // so we don't leave the terminal in raw mode if the server rejects us. let direct_attach = attach_escape.is_some(); let terminal_guard = if direct_attach { - setup_direct_attach_terminal() + setup_direct_attach_terminal(mouse_capture) } else { setup_terminal(mouse_capture) } -- cgit v1.2.3