Skip to content

Pasted code has a wrong indent #246610

Open
Open
@FirstVertex

Description

@FirstVertex

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Copy multiple lines of code
  2. Paste somewhere else
  3. Notice it is indented too much and you have to manually unindent it, or in my case, save the file so Prettier reformats (I don't use format on paste)

This is a regression, happened in the last 2 releases. It used to work fine. Now it is incorrect almost every time. Even when it needs to be the same indent as the source, it will paste wrong.

Expect that wherever I am in the code, when I paste multiple lines of code, it should take on the current section's indentation correctly.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-autoindentEditor auto indentation issueseditor-clipboardEditor clipboard issuesinfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions