Skip to content

vcFormat does not work near the end of a file with UTF-8 characters > 1 byte #7704

Description

@Aegel5

Bug type: Language Service

Describe the bug

  • OS and Version: NT 10.0.19042
  • VS Code Version: 1.57.0
  • C/C++ Extension Version: 1.5.0

Steps to reproduce

  1. Open b.cpp source file with settings.json
  2. Set cursor after task(){
  3. Press 'enter' - additional spaces would be inserted
  4. Call 'format document' - no result

Expected behavior
'format document' need to be worked
'Enter' must not create additional spaces

b.cpp

ll C_KOMB(ll n, ll k) { return fact(n) / (fact(k) * fact(n - k)); } // кол-во выборок без учета порядка, n - всего, k - сколько нужно взять в набор
ll A_KOMB(ll n, ll k) { return fact(n) / fact(n - k); }             // Дополнительно добавляет фактор порядка, т.е. (1,2) и (2,1) - разные выборки.

void task(){
                
                    


int a = 10;          

}

settings.json

{
    "editor.formatOnType": true,
    "C_Cpp.formatting": "vcFormat",
    "C_Cpp.vcFormat.newLine.beforeElse": false,
    "editor.formatOnPaste": true
}

Metadata

Metadata

Labels

Feature: Code FormattingLanguage ServiceWorks in VSSo we'd need to fix it for VS Code to reach parity.bugfixedCheck the Milestone for the release in which the fix is or will be available.quick fixworld readyAn issue relating string character encodings, localization translations, etc.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions