-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace_selections_with_clipboard
doesn't remove cr
on windows
#12329
Comments
Looks like paste has a regex to remove the endings helix/helix-term/src/commands.rs Lines 4433 to 4439 in 9e77c44
Replace doesnt helix/helix-term/src/commands.rs Lines 4528 to 4557 in 9e77c44
Though I feel |
thanks for looking into this, and ye i was wondering where i should open this issue. but for consistency sake shouldn't helix anyways i opened the issue in biome as well biomejs/biome#4789 |
replace_selections_with_clipboard
doesn't remoce cr
on windowsreplace_selections_with_clipboard
doesn't remove cr
on windows
Previously we replaced line-endings in pasted text to the document line-ending for some values in paste commands. We missed the `repeat` values in paste though and didn't do any replacement in the replace command. Along with this change I've refactored the replace command to avoid intermediary collections. We previously eagerly collected the values from the input register as a `Vec<String>` but we can avoid both of those conversions and only allocate for the conversion to a `Tendril`. We can also switch from `str::repeat` to a manual implementation to avoid the intermediary conversion to a String - this avoids an extra allocation in the common case (i.e. no count). Fixes helix-editor#12329
Previously we replaced line-endings in pasted text to the document line-ending for some values in paste commands. We missed the `repeat` values in paste though and didn't do any replacement in the replace command. Along with this change I've refactored the replace command to avoid intermediary collections. We previously eagerly collected the values from the input register as a `Vec<String>` but we can avoid both of those conversions and only allocate for the conversion to a `Tendril`. We can also switch from `str::repeat` to a manual implementation to avoid the intermediary conversion to a String - this avoids an extra allocation in the common case (i.e. no count). Fixes helix-editor#12329
Previously we replaced line-endings in pasted text to the document line-ending for some values in paste commands. We missed the `repeat` values in paste though and didn't do any replacement in the replace command. Along with this change I've refactored the replace command to avoid intermediary collections. We previously eagerly collected the values from the input register as a `Vec<String>` but we can avoid both of those conversions and only allocate for the conversion to a `Tendril`. We can also switch from `str::repeat` to a manual implementation to avoid the intermediary conversion to a String - this avoids an extra allocation in the common case (i.e. no count). Fixes helix-editor#12329
Previously we replaced line-endings in pasted text to the document line-ending for some values in paste commands. We missed the `repeat` values in paste though and didn't do any replacement in the replace command. Along with this change I've refactored the replace command to avoid intermediary collections. We previously eagerly collected the values from the input register as a `Vec<String>` but we can avoid both of those conversions and only allocate for the conversion to a `Tendril`. We can also switch from `str::repeat` to a manual implementation to avoid the intermediary conversion to a String - this avoids an extra allocation in the common case (i.e. no count). Fixes helix-editor#12329
Previously we replaced line-endings in pasted text to the document line-ending for some values in paste commands. We missed the `repeat` values in paste though and didn't do any replacement in the replace command. Along with this change I've refactored the replace command to avoid intermediary collections. We previously eagerly collected the values from the input register as a `Vec<String>` but we can avoid both of those conversions and only allocate for the conversion to a `Tendril`. We can also switch from `str::repeat` to a manual implementation to avoid the intermediary conversion to a String - this avoids an extra allocation in the common case (i.e. no count). Fixes helix-editor#12329
Summary
when copying multiline text on windows and then replacing the selection with
space+R
the carriage returncr
doesn't get removed which causes bugs in biome formatting, pasting withspace+p
works fine thoughReproduction Steps
sample code to copy
hx-biome-bug.mp4
I tried this:
biome format
, nocr
is showing(expected)space+R
biome format
showscr
fmt
multiple times and biome gets confusedthis is my config
Helix log
~/.cache/helix/helix.log
Platform
windows
Terminal Emulator
windows-terminal
Installation Method
source
Helix Version
helix 24.7 (91a5d40)
The text was updated successfully, but these errors were encountered: