From d674ec4e038501ae626b71e86d4209de5f421bc6 Mon Sep 17 00:00:00 2001 From: Jost Alemann Date: Wed, 30 Oct 2024 20:07:59 +0100 Subject: [PATCH] hide mouse based on pty typing --- src/Surface.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index 82d1240eb..ca5839088 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1565,13 +1565,13 @@ pub fn keyCallback( if (self.io.terminal.modes.get(.disable_keyboard)) return .consumed; } - // If this input event has text, then we hide the mouse if configured. + // If this input event sends data to pty, we hide the mouse if configured. // We only do this on pressed events to avoid hiding the mouse when we // change focus due to a keybinding (i.e. switching tabs). if (self.config.mouse_hide_while_typing and event.action == .press and !self.mouse.hidden and - event.utf8.len > 0) + !event.key.modifier()) { self.hideMouse(); }