-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.83.1
- OS Version: Ubuntu 22.04.2 LTS
Steps to Reproduce:
- Rename a symbol (that changes multiple files) with preview
=> An onDidOpenTextDocument event is emitted for every file involved in the renaming operation
=> Whenever I select a file from the Refactor Preview onDidOpenTextDocument is emitted twice (I assume because of the diff editor?)
It also seems that some of the onDidOpenTextDocument events are followed by their corresponding onDidCloseTextDocument events, although this is not always the case.
I have a few issues/questions regarding this:
-
all of the onDidOpenTextDocument/didOpens will be completed even though their corresponding onDidCloseTextDocument/didClose was emitted (making that didOpen obsolete). This means that, when a rename symbol affects a lot of files, there will be a visible slowdown due to the time it takes to complete all of the didOpens.
-
I think it might be useful to know the actual context of an onDidOpenTextDocument event that was emitted. Was it emitted because of the Refactoring Preview view, or was it because the user manually opened a file? Can this be achieved / considered for future implementations?
-
Why are there so many onDidOpenTextDocument events emitted in the first place? Do I actually need to take them into consideration, just like I would for a "normal" didOpen? (It looks like I don`t ...)
Thanks!