microsoft / vscode

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

Reformat on search & replace #135142

Closed emil-nasso closed 3 years ago

emil-nasso commented 3 years ago

Issue Type: Bug

When I search and replace I have recently started seeing unrelated changes. The files seems to be reformatted when the file is being saved after the replace is performed. This issue seems to have started recently, a few versions back.

I don't have "format on save" enabled.

The problem is still there with all extensions disabled.

The problem is still there in the "insiders build".

I don't really know where to start looking. Any guidance would be greatly appreciated!

VS Code version: Code 1.61.1 (c13f1abb110fc756f9b3a6f16670df9cd9d4cf63, 2021-10-14T01:15:35.620Z) OS version: Linux x64 5.11.0-37-generic Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 2624)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|2, 1, 1| |Memory (System)|15.23GB (0.34GB free)| |Process Argv|. --crash-reporter-id 92c28128-25d1-4b42-a3f0-d7c72e243064| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|cinnamon| |XDG_CURRENT_DESKTOP|X-Cinnamon| |XDG_SESSION_DESKTOP|cinnamon| |XDG_SESSION_TYPE|x11|
Extensions (52) Extension|Author (truncated)|Version ---|---|--- vscode-sqlite|ale|0.13.0 laravel-extra-intellisense|ami|0.6.1 vscode-intelephense-client|bme|1.7.1 better-phpunit|cal|1.5.3 vscode-phpstan|Cal|0.1.8 path-intellisense|chr|2.4.0 bracket-pair-colorizer|Coe|1.0.61 vscode-markdownlint|Dav|0.44.4 xml|Dot|2.5.1 vscode-phpmd|eco|1.3.0 EditorConfig|Edi|0.16.4 vscode-command-runner|edo|0.0.118 prettier-vscode|esb|9.0.0 php-debug|fel|1.21.0 go|gol|0.28.1 beautify|Hoo|1.5.0 jenkins-pipeline-linter-connector|jan|1.2.0 php-cs-fixer|jun|0.2.8 vscode-phpfmt|kok|1.0.30 php-add-property|kot|1.1.0 graphql-for-vscode|kum|1.15.3 php-import-checker|mar|0.5.0 php-namespace-resolver|Meh|1.1.8 dotenv|mik|1.0.1 laravel-intellisense|moh|0.2.0 vscode-apache|mrm|1.2.0 vscode-duplicate|mrm|1.2.1 vscode-docker|ms-|1.17.0 python|ms-|2021.10.1336267007 vscode-pylance|ms-|2021.10.1 jupyter|ms-|2021.9.1101343141 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.3 remote-ssh|ms-|0.65.8 remote-ssh-edit|ms-|0.65.8 vsliveshare|ms-|1.0.4991 sqltools|mtx|0.23.0 php-docblocker|nei|2.6.1 vetur|oct|0.34.1 pixelbyte-love2d|pix|0.1.22 live-share-mob-timer|Plu|0.1.5 vscode-commons|red|0.0.6 vscode-yaml|red|0.23.0 phpdoc-comment-vscode-plugin|rex|1.3.0 laravel-artisan|rya|0.0.28 jenkinsfile-support|sec|0.1.0 code-settings-sync|Sha|3.4.3 vscode-fileutils|sle|3.4.5 shellcheck|tim|0.17.0 php-phan|Tys|5.0.0 twig|wha|1.0.2 local-history|xyz|1.8.1
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 pythonvspyt639:30300192 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30358480 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 vsccppwt:30382697 pythonvssor306:30344512 bridge0708:30335490 pygetstartedt2:30371810 dockerwalkthru:30377721 bridge0723:30353136 pythonrunftest32:30373476 pythonf5test824:30373475 javagetstartedc:30364665 pythonvspyt187:30373474 vsqsis200:30381674 vsaa593cf:30376535 vssld246:30379911 ```
emil-nasso commented 3 years ago

This is most likely one of my extensions after all...

The reason I thought the problem was still there after the extensions were disabled was because I confused the "insert new line at end of file"-feature with a format.

Will close this issue.