Cannot paste multi line text from system clipboard in some cases #8601
-
SummaryI continue running into an issue where pasting multi-line text from the system clipboard (SpaceP) only inserts a single line. I think I narrowed it down to my (ab)use of Spacey with multiple cursors to join and yank selections and then paste the combined text with SpaceP using a single cursor. Reproduction StepsStart with this file: int main() {
switch (1) {
case 0: break;
case 1: break;
case 2: break;
case 3: break;
}
}
Expected result (this worked a while ago): case 0: break;
case 1: break;
case 2: break;
case 3: break;
Actual result: case 0: break;
It almost seems like the clipboard's contents break somehow. If I paste the yanked text in another editor, I get the expected result and from there I can copy and (in helix) paste the text without issues. I tried inspecting the bytes of the yanked text by saving the bad result as a file, but wasn't able to find anything. Helix loglog (-vvv, nothing of interest)
PlatformWindows Terminal Emulatorwezterm (nightly) Helix Version |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
this is expected behavior if you paste from helix to helix. With #6985 helix now treats the clipboard the same as any other register with regards to multicursors. Specifically y does not join selections anymore. So you would need to join selections first or use In the past running (for youx example) |
Beta Was this translation helpful? Give feedback.
this is expected behavior if you paste from helix to helix.
With #6985 helix now treats the clipboard the same as any other register with regards to multicursors.
Specifically y does not join selections anymore. So you would need to join selections first or use
:yank-joined
.In the past running (for youx example)
%s\d<ret><space>y<space>p
would have pasted1\n0\n1\n2\n3
at every cursor where now it will simply duplicate the number just as if you usedy
andp