Repository navigation
Conversation
paste-buffer escaped a CR in the buffer as the two characters '\r'. vis(3) VIS_SAFE, which tmux uses for this escaping, keeps CR raw, and CR is the byte that ends each pasted line, so a multi-line paste reached the program as one line with literal '\r' text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: rhys <5460583+xanth@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #239
Summary
paste-bufferescaped a CR in the buffer as the two characters\r. vis(3)VIS_SAFE, which tmux uses for this escaping (cmd-paste-buffer.c), keeps CR raw, and CR is the byte that ends each pasted line. So a multi-line paste reached the program as one line with literal\rtext, and nothing ran.encode_paste_byteincrates/rmux-core/src/vis.rsnow returns CR unchanged, asVIS_SAFEdoes. This affects every platform.Testing
Tested on: Windows 11 Pro 10.0.26300 (build 26300), with this branch on RMUX 0.10.0.
cargo test -p rmux-core vis: the new testsafe_paste_encoding_keeps_carriage_returnsencodesb"ab\rcd\r"unchanged.set-bufferwithecho one\recho two\rand thenpaste-bufferruns both commands (the pane showsoneandtwo), as tmux does.Linux and macOS are covered by this PR's CI.
Cargo gates on the workspace:
cargo fmt --all -- --check: pass.cargo clippy --workspace --all-targets -- -D warnings: pass with the pinned toolchain (1.96.1).cargo build --workspace: pass.cargo test --workspace --all-targets: run once on Windows with all of these fixes merged, with the same settings as the Windows CI job. 7,018 passed. 45 tests in the release and bench specs fail on this machine because Python is not onPATH(43) or the temp path is too long (2); they fail the same way without these fixes. Not run here, because they open console windows:windows_attach_exit,windows_attach_fuzz,windows_nested_mouse_issue96,windows_prompt_overlay_chain,windows_mouse_border_resize,rmux-pty'swindows_conpty, andrmux-client'smanaged_attach_stdout_has_single_console_mode_owner.🤖 Generated with Claude Code