mirror of
https://github.com/psmux/psmux.git
synced 2026-06-19 09:46:56 +08:00
Root cause: On Windows, Ctrl+V Release event can arrive BEFORE the clipboard character injection (async console host behavior). When paste_confirmed fires with empty paste_pend, the clipboard-read fallback sends a send-paste. Then the injected chars arrive, get buffered, trigger stage2, and send a SECOND send-paste with the same content. Fix: Every code path that sends paste content now sets paste_suppress_until (2s window) to block subsequent char accumulation and clipboard reads: - POST_CONFIRMED (post-event flush with pending chars) - CLIPBOARD_FALLBACK (Ctrl+V Release with empty buffer) - TOP_CONFIRMED (top-of-loop flush) - STAGE2_TIMEOUT (300ms no-Ctrl+V fallback) - Event::Paste handler (crossterm bracketed paste) Also suppress send-key C-v on Windows since the console host already handles clipboard injection. Forwarding C-v to the PTY causes PowerShell to paste a second time. SSH: Remove temporary diagnostic from ssh_input.rs feed() tilde logging (issue #197 VT paste fix verified separately). Verified: Win32 Ctrl+V test shows exactly 1 server paste. SSH paste test: all 6 cases pass with no regression.
4 lines
44 B
Batchfile
4 lines
44 B
Batchfile
@echo off
|
|
set PSMUX_INPUT_DEBUG=1
|
|
psmux.exe
|