You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a JavaScript file with code that needs formatting.
Select a portion of the code by dragging the cursor over the desired section.
Use the "Format Selection" feature, which should format only the selected code.
Observe the result: instead of formatting only the selected code, the entire function (or the code outside the selection) is also formatted.
Additionally, if the cursor is placed in the file without any selected range, the "Format Selection" feature behaves as "Format Document," formatting the entire file instead of the selected line or section.
Expected behavior: Only the selected code range should be formatted.
Thank you.
Extension version: 11.0.0
VS Code version: Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6, 2024-10-31T05:14:54.222Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.4.0-200-generic
System Info
Item
Value
CPUs
11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz (16 x 2496)
The text was updated successfully, but these errors were encountered:
qiyana-ratchet
changed the title
"Format Selection" formats code outside the selected range
"Format Selection" formats code outside the selected range on Visual Studio Code
Nov 7, 2024
Type: Bug
Steps to Reproduce:
Thank you.
Extension version: 11.0.0
VS Code version: Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6, 2024-10-31T05:14:54.222Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.4.0-200-generic
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: