microsoft / vscode

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

Moved lines compare becomes broken when double clicking #191517

Open Igorgro opened 1 year ago

Igorgro commented 1 year ago

Testing #191508

Steps to Reproduce:

  1. Create a moved code block
  2. Click "compare" button to enable compare mode, arrow becomes orange and editors become scrolling synced
  3. Double-click "compare" button again - compare mode disabled and enabled again, but the editor shakes and left and right sides become non scrolling synced

https://github.com/microsoft/vscode/assets/22894169/90d6f8d4-3176-4538-a707-72e1b69fb9e3

Example

hediet commented 1 year ago

Thanks for reporting this!

Igorgro commented 1 year ago

I found one similar bug: after opening diff editor containing moves form SCM, if I click on "compare" button, then the editor shakes the same as in the video, but the compare mode is not activated at all (even compare button is not highlighted). It happens only once after each diff editor opening. Unfortunately, I cannot reproduce this bug outside of vscode (i.e. in online sandbox).

UPD. Video of reproducing:

https://github.com/microsoft/vscode/assets/22894169/180ec0f4-f4bd-4ece-83ba-70db1b4aca6f