microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

Creation declaration/definition that targets a new file (or an empty one) has 2 extra newlines if clang-format isn't used #10164

Open sean-mcmanus opened 1 year ago

sean-mcmanus commented 1 year ago

In test.h, do Create Declaration/Definition on

void func();

with an empty test.cpp.

Bug: The result has 2 extra newlines:

#include "test.h"

void func()
{
}

It's possible the root cause issue might result in other bugs, not sure though.

sean-mcmanus commented 1 year ago

This got fixed in 1.13.5 (pre-release, release candidate): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.5, but only if clang-format is used....I've updated the title to reflect this.