microsoft / vscode

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

`Refactor Preview` text editors are still reported by `vscode.window.visibleTextEditors` after they're closed #228367

Open werat opened 6 days ago

werat commented 6 days ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Make Refactor Preview appear (e.g. open some file and try some of Refactor... context actions)
  2. Close the preview editor via Discard button
  3. Call vscode.window.visibleTextEditors
  4. It contains the vscode-bulkeditpreview-editor://... editor that corresponds to the Refactor Preview we just closed as well as the file that refactor preview was referencing

Repro and demo:

https://github.com/user-attachments/assets/4418fe28-9a5f-499a-baae-44219805d642

vs-code-engineering[bot] commented 6 days 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.93.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

werat commented 6 days ago

I've just updated and tried it on 1.93.1 -- I can confirm that it still reproduces.

jrieken commented 2 days ago

@hediet it seems that closing the preview editor doesn't reset it, e.g all editors and its models are still around