microsoft / vscode

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

Pasting into a one-line block comment causes block comment to be deleted #205971

Closed hamishtodd1 closed 8 months ago

hamishtodd1 commented 8 months ago

Type: Bug

I start with this code:

for (let j = 0, jl = snappables.length; j < jl; j++) { }

I put a block comment in a particular place:

for (let j = /**/0, jl = snappables.length; j < jl; j++) { }

I then copy any text, just "a" will do. I then put the cursor between / and / I press ctrl+v ...and it deletes the / and / and the thing I just pasted

VS Code version: Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:08:20.941Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)| |GPU Status|2d_canvas: enabled
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| |Load (avg)|undefined| |Memory (System)|15.84GB (4.09GB free)| |Process Argv|--crash-reporter-id 0032ee3a-209f-4278-b3fb-a8cf6f02770a| |Screen Reader|no| |VM|0%|
Extensions (12) Extension|Author (truncated)|Version ---|---|--- increment-selection|alb|0.2.0 gltf-vscode|ces|2.4.0 macros|ged|1.2.1 copilot|Git|1.162.0 copilot-chat|Git|0.12.2 vscode-settings-cycler|hoo|1.0.1 cursor-jump|leo|0.0.1 vscode-autohotkey-plus-plus|mar|5.0.3 the-language|one|0.0.86 LiveServer|rit|5.7.9 shader|sle|1.1.5 vscode-lldb|vad|1.10.0
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 7j2b6412:30964151 ```
vscodenpa commented 8 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.86.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

hediet commented 8 months ago

Cannot reproduce:

dAW2zNsJA0

gjsjohnmurray commented 8 months ago

@hamishtodd1 please use the Start Extension Bisect command to investigate whether the problem is being caused by one of your extensions.

vscodenpa commented 8 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!