hide mouse based on pty typing

This commit is contained in:
Jost Alemann
2024-10-30 20:07:59 +01:00
parent c413f2445d
commit d674ec4e03

View File

@ -1565,13 +1565,13 @@ pub fn keyCallback(
if (self.io.terminal.modes.get(.disable_keyboard)) return .consumed; 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 // We only do this on pressed events to avoid hiding the mouse when we
// change focus due to a keybinding (i.e. switching tabs). // change focus due to a keybinding (i.e. switching tabs).
if (self.config.mouse_hide_while_typing and if (self.config.mouse_hide_while_typing and
event.action == .press and event.action == .press and
!self.mouse.hidden and !self.mouse.hidden and
event.utf8.len > 0) !event.key.modifier())
{ {
self.hideMouse(); self.hideMouse();
} }