microsoft / vscode

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

Instead of a snippet, a random section of the current file is pasted after the original paste. #184284

Closed mikeytdisco closed 1 year ago

mikeytdisco commented 1 year ago

Type: Bug

I thought this was a problem with the extension "arduino-snippets." I would ctrl-c to copy a couple of lines of code, the ctrl-v to paste it in. I did get what I pasted, and the I'd get a block of random code from elsewhere in the file. I could ctrl-z to undo the extra block of code, but this was a hassle. I stopped the "problem" by disabling the extension. The Arduino file type is .ino, and only editing the .ino files exhibited the problem.

I had another extension installed - "OpenSCAD Language Support." This adds some nice features with files of type .scad. Lo! And Behold! The same bad paste behavior occurred. I had to disable this extension to avoid the problem while editing .scad files.

Two different extension, one bad issue. Seems that there might have been an API that these two extension use that changed.

VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i9-13900K (32 x 2995)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.75GB (16.32GB free)| |Process Argv|--crash-reporter-id f997e3b6-cdd1-4675-920c-bdaba8a07710| |Screen Reader|no| |VM|0%|
Extensions (68) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.0.0 midl3-language-server|Ale|0.0.31 vscode-django|bat|1.10.0 pico-go|Chr|1.4.3 doxdocgen|csc|1.4.0 vscode-markdownlint|Dav|0.50.0 vscode-eslint|dba|2.4.0 vscode-research|dev|1.2022.1111005 githistory|don|0.6.20 python-environment-manager|don|1.0.4 python-extension-pack|don|1.7.0 gitlens|eam|13.6.0 vscode-pull-request-github|Git|0.64.0 vscode-guid|hea|1.7.0 better-cpp-syntax|jef|1.17.2 compare-helper|kee|1.1.1 vsc-python-indent|Kev|1.18.0 restructuredtext|lex|189.3.0 cortex-debug|mar|1.11.2 debug-tracker-vscode|mcu|0.0.15 memory-view|mcu|0.0.20 peripheral-viewer|mcu|1.4.5 rtos-views|mcu|0.0.6 tdpcode|Mic|1.9.18 vscode-azdo-codereview|Mic|1.2021.827002 vscode-nmake-tools|Mic|4.0.220809006 wavework|Mic|1.2023.525002 pack-arduino|mpt|0.1.0 vscode-docker|ms-|1.25.1 csharp|ms-|1.25.8 isort|ms-|2022.8.0 python|ms-|2023.8.0 vscode-pylance|ms-|2023.5.50 sarif-viewer|MS-|3.3.7 jupyter|ms-|2023.4.1011241018 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.292.0 remote-ssh|ms-|0.102.0 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.78.9 cpptools|ms-|1.15.4 cpptools-extension-pack|ms-|1.3.0 hexeditor|ms-|1.9.11 makefile-tools|ms-|0.7.0 powershell|ms-|2023.5.0 remote-explorer|ms-|0.4.0 sublime-keybindings|ms-|4.0.10 vscode-serial-monitor|ms-|0.9.0 autodocstring|njp|0.6.1 platformio-ide|pla|3.1.1 robotframework-lsp|rob|1.10.1 rust-analyzer|rus|0.3.1533 partial-diff|ryu|1.4.3 code-spell-checker|str|2.20.4 vscode-asl|Tho|1.0.0 simple-rst|tro|1.5.3 vscode-lldb|vad|1.9.2 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-arduino|vsc|0.6.230420001 vscode-icons|vsc|12.4.0 edk2-vscode|wal|1.0.9 jinja|who|0.0.8 local-history|xyz|1.8.1 uncrustify|zac|3.2.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vscaat:30438848 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 2e4cg342:30602488 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 03d35959:30757346 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30730052 pythongtdpath:30739704 ```
VSCodeTriageBot commented 1 year ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!