Skip to content

Bhrg/paste empty selection includes newline#286939

Closed
BartolHrg wants to merge 2 commits intomicrosoft:mainfrom
BartolHrg:bhrg/paste-empty-selection-includes-newline
Closed

Bhrg/paste empty selection includes newline#286939
BartolHrg wants to merge 2 commits intomicrosoft:mainfrom
BartolHrg:bhrg/paste-empty-selection-includes-newline

Conversation

@BartolHrg
Copy link
Copy Markdown
Contributor

Inspired by #256039 (comment)
Depends on: #286895

Description

Add new setting: editor.pasteEmptySelectionIncludesNewline
Values:

  • always (default): Both single & multiple cursors paste with '\n' when copying empty selection
  • never: Both single & multiple cursors trim '\n' from the end when copying empty selection
  • singleOnly: Multiple cursors trim '\n' from the end when copying empty selection
  • multipleOnly: Single cursor trims '\n' from the end when copying empty selection

More detailed description:

In each case I show before and after copy-pasting with single and multiple cursors. | denotes cursor(s).

always

aa=|=

->

aa==
aa=|=

aa=|=
bb=|=

->

aa==
aa=|=
bb==
bb=|=

never

aa=|=

->

aa=aa==|=

aa=|=
bb=|=

->

aa=aa==|=
bb=bb==|=

singleOnly

aa=|=

->

aa==
aa=|=

aa=|=
bb=|=

->

aa=aa==|=
bb=bb==|=

multipleOnly

aa=|=

->

aa=aa==|=

aa=|=
bb=|=

->

aa==
aa=|=
bb==
bb=|=

@Tyriar Tyriar assigned aiday-mar and unassigned Tyriar Jan 10, 2026
@BartolHrg BartolHrg closed this Jan 12, 2026
@BartolHrg BartolHrg deleted the bhrg/paste-empty-selection-includes-newline branch January 12, 2026 20:57
@BartolHrg
Copy link
Copy Markdown
Contributor Author

Guess that's what happens when you try to "manually rebase"
by deleting a branch and creating another one with the same name

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants