Skip to content

Incorrect indentation after C multi-line comment blocks #241370

Open
@acarlson-i3

Description

@acarlson-i3

Does this issue occur when all extensions are disabled?: Yes
NOTE: When all extensions are disabled, there is no correct indentation after a multi-line comment block. But the C/C++ Extension pack appears to allow the first line after a multi-line comment block to be indented correctly.

  • VS Code Version: 1.97.2
  • OS Version: Windows_NT x64 10.0.26100

I noticed this issue when attempting to copy and paste the contents from one file to another. I believe this is specifically tied to the multi-line comment block.

Steps to Reproduce:

  1. Start a new file
  2. Set language to C
  3. Create a multi-line comment block

Image

  1. Place cursor at the end of the final line of the comment block
  2. Create a new line, observe indentation returns to column 1
  3. Create a new line, observe the indentation advances to column 2
new.line.indent.bug.mp4
  1. Paste any content below the comment block and observe the indentation advance to column 2
new.line.paste.bug.mp4
  1. Paste an entire file that begins with this style of comment block and observe the indentation advance to column 1
whole.file.paste.bug.mp4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions