microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.72k stars 28.16k forks source link

on-enter rule not applying on reload #204435

Open mjbvz opened 5 months ago

mjbvz commented 5 months ago

Type: Bug

  1. Create file.jsx with the content:
const a = <div onclick={bla}>
  1. Open and reload VS Code
  2. Put cursor at end of line and press return

Expected:

const a = <div onclick={bla}>
    |

Actual:

const a = <div onclick={bla}>
|

If you add a single semicolon to the initial document like so

const a = <div onclick={bla}>;

and then delete it, the scenarior starts working

VS Code version: Code - Insiders 1.87.0-insider (Universal) (ec291c126878742ad640055ce604a58129cd088c, 2024-02-05T05:47:43.946Z) OS version: Darwin arm64 23.3.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software| |Load (avg)|5, 5, 5| |Memory (System)|64.00GB (2.08GB free)| |Process Argv|--crash-reporter-id 0fffb5da-9cd7-46fd-9e7f-a1564e8c5fda| |Screen Reader|no| |VM|0%|
mjbvz commented 5 months ago

Can't get this to happen in OSS but happens consistently for me in insiders with a new profile and all extensions disabled