Skip to content

Conversation

@BartolHrg
Copy link
Contributor

@BartolHrg BartolHrg commented Jan 10, 2026

When having emptySelectionClipboard: true,
and when you have multiple cursors and all of them are empty,
and when we copy and paste,
paste should paste in the line above (consistent with single empty cursor copy-paste).

Fixes: #286892
Related: issue #256039, PR #256083

Testing:

  • Set emptySelectionClipboard: true in settings
  • Open new file
  • Write this and put 2 cursors in place of |. Nothing is selected.
a|=
b|=
  • Copy
  • Paste

Currently, it this is the result:

aa=
|=
bb=
|=

It should produce

a=
a|=
b=
b|=

Note that that would be consistent with single line empty copy-paste

a|=

Currently produces

a=
a|=

I added test in cursor.test.ts issue #286892: paste from multiple cursors with empty selections and multiCursorPaste full in the middle of the line
I also tested various scenarios with different settings of editor.emptySelectionClipboard and editor.multiCursorPaste.

  • my changes have no effect when editor.emptySelectionClipboard: false
  • editor.multiCursorPaste: "spread" and "full" work as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple cursors empty copy does not paste in line above

3 participants