fix: handle \\\\ escape in parse_command_line (backslash key broken in panes)#123
fix: handle \\\\ escape in parse_command_line (backslash key broken in panes)#123schgoo wants to merge 2 commits into
Conversation
… right-click, CRLF) Fix 6 bugs in client-server mode reported in #118: 1. display-message: handler now sets app.status_message when not using -p flag, so messages actually appear on the status bar. 2. Mouse multi-client tracking: all 10 mouse/scroll CtrlReq variants now carry client_id. Server updates latest_client_id on mouse events so coordinate processing uses the clicking client's dimensions. 3. Popup race condition: added 50ms delay after PTY spawn in display-popup so the reader thread can populate the vt100 parser before the first frame is serialized to clients. Prevents blank popups with fast commands. 4. Paste fragmentation: added growth detection to stage2 timeout. If the paste_pend buffer grew since the last check, the timeout is extended instead of splitting the paste. Large non-ASCII buffers (>=20 chars) now enter stage2 instead of being flushed as IME input. 5. Right-click copy paste suppression: after right-click copy, text key events are suppressed for 2s to prevent VS Code ConPTY from injecting duplicate clipboard content as key events. 6. Clipboard CRLF normalization: read_from_system_clipboard() now normalizes Windows CRLF line endings to LF, preventing double-spaced paste output. Also includes the parse_command_line \\\\ escape fix from #123.
Fix 6 bugs in client-server mode reported by @ToxMox in #118: 1. display-message: handler now sets app.status_message when not using -p flag, so messages actually appear on the status bar. 2. Mouse multi-client tracking: all 10 mouse/scroll CtrlReq variants now carry client_id. Server updates latest_client_id on mouse events so coordinate processing uses the clicking client's dimensions. 3. Popup race condition: added 50ms delay after PTY spawn in display-popup so the reader thread can populate the vt100 parser before the first frame is serialized to clients. Prevents blank popups with fast commands. 4. Paste fragmentation: added growth detection to stage2 timeout. If the paste_pend buffer grew since the last check, the timeout is extended instead of splitting the paste. Large non-ASCII buffers (>=20 chars) now enter stage2 instead of being flushed as IME input. 5. Right-click copy paste suppression: after right-click copy, text key events are suppressed for 2s to prevent VS Code ConPTY from injecting duplicate clipboard content as key events. 6. Clipboard CRLF normalization: read_from_system_clipboard() now normalizes Windows CRLF line endings to LF, preventing double-spaced paste output. Also fixes parse_command_line backslash escape reported by @schgoo in #123. The parser now recognises \\ as an escape sequence inside double quotes (producing a single \), preventing the closing quote from being consumed when the client sends send-text "\\". Co-investigated-by: @ToxMox (#118) Co-investigated-by: @schgoo (#123)
|
Hey @schgoo, nice catch! Your fix is spot-on — the I've landed the same core fix in commit b37c89e — adding Thanks for the clean analysis and the tests — really appreciate the contribution. Closing this since the fix is already on master, but you're credited in the commit. Cheers! |
|
Nice! Thanks for getting to this so quickly! |
|
You're welcome! Share the good news about Psmux! |
Brings 17 upstream commits into ohboy-builds: - fix: warm claim race condition (psmux#136) - fix: client_prefix flag, window_zoomed_flag (psmux#125, psmux#126) - fix: Shift+Enter/Ctrl+Enter modifiers, paste normalization (psmux#131, psmux#132) - fix: backslash escape, 6 client-server bugs (psmux#118, psmux#123) - fix: -f global option (psmux#119) - fix: set-hook replace/remove, zoomed navigation wrap (psmux#133, psmux#134) - fix: TERM env var mapping, hyphenated option leak (psmux#137) - feat: bell/activity/silence monitoring, allow-rename, update-environment - feat: vim-style bind-key C-hjkl pane navigation (psmux#130) - feat: XDG plugin path support (psmux#135) - feat: auto-generate changelog in release workflow - refactor: move Rust tests to tests-rs/ directory - refactor: rich test dashboard Also applies ohboy-builds stashed changes: - Remove claude-code-fix-tty (Claude Code now auto-detects $TMUX) - Migrate env::set_var to safe crate::util::set_env wrappers (Rust 1.83) - Selection clamp to pane boundaries in copy mode - Fix clippy warnings in forked crates (vt100-psmux, portable-pty-psmux)
Fix 6 bugs in client-server mode reported by @ToxMox in psmux#118: 1. display-message: handler now sets app.status_message when not using -p flag, so messages actually appear on the status bar. 2. Mouse multi-client tracking: all 10 mouse/scroll CtrlReq variants now carry client_id. Server updates latest_client_id on mouse events so coordinate processing uses the clicking client's dimensions. 3. Popup race condition: added 50ms delay after PTY spawn in display-popup so the reader thread can populate the vt100 parser before the first frame is serialized to clients. Prevents blank popups with fast commands. 4. Paste fragmentation: added growth detection to stage2 timeout. If the paste_pend buffer grew since the last check, the timeout is extended instead of splitting the paste. Large non-ASCII buffers (>=20 chars) now enter stage2 instead of being flushed as IME input. 5. Right-click copy paste suppression: after right-click copy, text key events are suppressed for 2s to prevent VS Code ConPTY from injecting duplicate clipboard content as key events. 6. Clipboard CRLF normalization: read_from_system_clipboard() now normalizes Windows CRLF line endings to LF, preventing double-spaced paste output. Also fixes parse_command_line backslash escape reported by @schgoo in psmux#123. The parser now recognises \\ as an escape sequence inside double quotes (producing a single \), preventing the closing quote from being consumed when the client sends send-text "\\". Co-investigated-by: @ToxMox (psmux#118) Co-investigated-by: @schgoo (psmux#123)
Fix for #122