Open
Description
Type: Bug
Install new instance of VS Code.
Create a .ts (typescript) file with the following:-
function noReformat(noReformat:string){
console.log(noReformat)
}
// function fun(myVariable) {
// let variable = myVariable; // this line with whitespace at the end stops format document from working
// }
Open the file and press Shift-Alt-F to reformat.
Expected result: document reformats i.e. inserts some spaces.
Actual result: no reformatting occurs.
Then, remove the space at the end of line 6 (i.e. after the word working) and press Shift-Alt-F to reformat; result reformatting now works correctly.
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
Item | Value |
---|---|
CPUs | Intel(R) Pentium(R) CPU G2020 @ 2.90GHz (2 x 2900) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: disabled_off opengl: enabled_on rasterization: unavailable_off raw_draw: disabled_off_ok video_decode: enabled video_encode: unavailable_off vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
Load (avg) | undefined |
Memory (System) | 5.70GB (0.53GB free) |
Process Argv | C:\Users\Derek\Desktop\Test.ts --crash-reporter-id 0213dfee-3f65-4d85-841a-4c77b6df0f67 |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
962ge761:30823813
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
synctok:30821570
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
dsvsc015:30823817