Skip to content
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

Multiline pasting fails on exactly two lines #80390

Closed
GuiRitter opened this issue Sep 5, 2019 · 6 comments
Closed

Multiline pasting fails on exactly two lines #80390

GuiRitter opened this issue Sep 5, 2019 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-clipboard Editor clipboard issues editor-multicursor Editor multiple cursor issues windows VS Code on Windows issues

Comments

@GuiRitter
Copy link

Issue Type: Bug

Hi everyone.

Consider the following piece of text:

copy the word "foo" from here ->
foo<- to here
paste 1st here:

paste 2nd here:

paste 3rd here:

Copy the foo word from arrow to arrow, in order to include the new line character. Place the caret at the end of the line containing 1st. Place another caret at the end of the line containing 2nd (default Alt+click). Paste. This is the expected result:

copy the word "foo" from here ->
foo<- to here
paste 1st here:
foo

paste 2nd here:
foo

paste 3rd here:

This is the actual result:

copy the word "foo" from here ->
foo<- to here
paste 1st here:

paste 2nd here:foo

paste 3rd here:

Only one line receives the paste, without the new line character. The same doesn't happen if there is only 1 caret or more than 2 carets. It also works normally if there's no new line character in the clipboard.

Note: this issue was originally opened in Insiders 1.29.0. It was closed when 1.36 was released, despite I still being able to reproduce it in Insiders 1.37.

Now that 1.38 has been released, since I still can reproduce the issue in Insiders 1.39, I'm reopening this issue.

Thanks in advance.

VS Code version: Code - Insiders 1.39.0-insider (7edc8f7, 2019-09-05T05:42:21.072Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 x 3200)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.69GB (1.71GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@vscodebot
Copy link

vscodebot bot commented Sep 5, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@GuiRitter
Copy link
Author

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Apart from the obvious first one, the other issues appear unrelated to me.

@alexdima alexdima added editor-clipboard Editor clipboard issues editor-multicursor Editor multiple cursor issues windows VS Code on Windows issues labels Sep 10, 2019
@alexdima
Copy link
Member

Let's track in #80624

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 10, 2019
@GuiRitter
Copy link
Author

Ok. But remember that, in this case, when the bug occurs, the line count matches the cursor count.

@alexdima
Copy link
Member

Starting with tomorrow's build, you can configure "editor.multiCursorPaste": "full" to get the behavior you want...

@GuiRitter
Copy link
Author

Starting with tomorrow's build, you can configure "editor.multiCursorPaste": "full" to get the behavior you want...

Strange, I checked in Insiders 1.39 a few days later but that option wasn't available. Now that 1.39 has been released, I can see the option.

Also, only now I realized this option works e.g. to copy a single block of 3 lines of text and paste each line on 3 separate cursors. Different from that, I was only interested in copying multiple selections.

Speaking of which, multiple selections where the number of selections is different from 2 works the same regardless of the value of "editor.multiCursorPaste".

As for the number of selections equal to 2, it's bugged as described for spread and working as intended for full. Also, different from what was written, full is what I expect to be the default behaviour.

So it's finally fixed for me.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-clipboard Editor clipboard issues editor-multicursor Editor multiple cursor issues windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

2 participants