aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-08-20 02:07:16 +0300
committerGitHub <noreply@github.com>2026-08-20 02:07:16 +0300
commit1b56601630c8de3825f18b37cfb4988ba87127f9 (patch)
tree2005a89a9d93d0e8e669913eb37a801d5ae62011 /src
parent52960ea5b6ee5d194d38cb1484c8bbed2f8bba98 (diff)
fix: honor mouse capture config in terminal attach (#2995)
refs #2992 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/client/mod.rs10
1 files changed, 5 insertions, 5 deletions
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<TerminalGuard> {
/// 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<TerminalGuard> {
- setup_terminal_with_capabilities(false, true)
+fn setup_direct_attach_terminal(mouse_capture: bool) -> io::Result<TerminalGuard> {
+ 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)
}