fix: correctly handle ^J in bracketed paste #5

Open
blokyk wants to merge 1 commit from blokyk/replxx:fix/ctrl-j-in-bracketed-paste into master
Member

Some terminal emulators (e.g. alacritty, ghostty, ...) use Ctrl+J instead of \n or \r to mark new lines in bracketed paste mode, which ended up being interpreted as literal UTF-32 characters, completely messing up the input

Some terminal emulators (e.g. alacritty, ghostty, ...) use <kbd>Ctrl</kbd>+<kbd>J</kbd> instead of `\n` or `\r` to mark new lines in bracketed paste mode, which ended up being interpreted as literal UTF-32 characters, completely messing up the input
some terminal emulators (e.g. alacritty, ghostty, ...) use ctrl+j
instead of \n or \r to mark new lines, which ended up being interpreted
as literal utf32 characters, completely messing up the input
jade approved these changes 2026-05-22 22:32:37 +00:00
jade left a comment
Owner

lgtm. is there a test we could cover this with somehow? Or are we not so lucky over here?

lgtm. is there a test we could cover this with somehow? Or are we not so lucky over here?
Author
Member

there are some tests that already deal with bracketed paste, i'll definitely add some (once i've figured out how they work)

there are some tests that already deal with bracketed paste, i'll definitely add some (once i've figured out how they work)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/ctrl-j-in-bracketed-paste:blokyk-fix/ctrl-j-in-bracketed-paste
git switch blokyk-fix/ctrl-j-in-bracketed-paste

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff blokyk-fix/ctrl-j-in-bracketed-paste
git switch blokyk-fix/ctrl-j-in-bracketed-paste
git rebase master
git switch master
git merge --ff-only blokyk-fix/ctrl-j-in-bracketed-paste
git switch blokyk-fix/ctrl-j-in-bracketed-paste
git rebase master
git switch master
git merge --no-ff blokyk-fix/ctrl-j-in-bracketed-paste
git switch master
git merge --squash blokyk-fix/ctrl-j-in-bracketed-paste
git switch master
git merge --ff-only blokyk-fix/ctrl-j-in-bracketed-paste
git switch master
git merge blokyk-fix/ctrl-j-in-bracketed-paste
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/replxx!5
No description provided.