aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/plugin_api/plugin_command.rs
diff options
context:
space:
mode:
authordivens <divens@users.noreply.github.com>2026-03-12 10:15:01 +0100
committerGitHub <noreply@github.com>2026-03-12 10:15:01 +0100
commit47f4a2f5a977d6b33d2cde0667982a03655a24c7 (patch)
treec77cbd19132386d8f5084b9fbcdda5713bdbcb87 /zellij-utils/src/plugin_api/plugin_command.rs
parentfix: handle short writes in write_to_tty_stdin to prevent paste truncation (#... (diff)
downloadsl0ppij-47f4a2f5a977d6b33d2cde0667982a03655a24c7.tar.gz
sl0ppij-47f4a2f5a977d6b33d2cde0667982a03655a24c7.tar.xz
sl0ppij-47f4a2f5a977d6b33d2cde0667982a03655a24c7.zip
fix: restore console input mode on exit to prevent mouse sequence leak (#4829)
* fix: restore console input mode on exit to prevent mouse sequence leak On Windows with WezTerm (VT input path), enable_vt_input() sets ENABLE_MOUSE_INPUT and ENABLE_VIRTUAL_TERMINAL_INPUT on the console handle. crossterm's disable_raw_mode() only ORs back LINE_INPUT, ECHO_INPUT and PROCESSED_INPUT — it never clears those flags. After Zellij exits, ConPTY continues delivering mouse events as VT escape sequences (urxvt mode 1015) into the shell's stdin, causing visible garbage like [555;99;32M at the prompt. Fix: save the original console mode before enable_vt_input() modifies it, and restore it on all exit paths via a new restore_console_mode() method on the ClientOsApi trait. Also move disable_mouse() before unset_raw_mode() on error/panic paths for correct ordering. * Move Windows VT input state management to stdin_handler_windows.rs Move enable_vt_input, restore_vt_input, ORIGINAL_CONSOLE_MODE, and related windows-sys imports from the shared stdin_handler.rs into stdin_handler_windows.rs to keep platform-specific code in _windows files per project convention. --------- Co-authored-by: divens <divens.dev@gmail.com>
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
0 files changed, 0 insertions, 0 deletions