-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
The editor resolver itself has logic to close an editor in case it is marked as singlePerResource via the closeExistingEditorsForResource method. Some editors, like file editor inputs, are shared across all resources. I.e. the same input is used for the same resource across all groups.
When the editor resolver resolves an editor it:
- converts the untyped editor to a typed one
- checks if the same resource is opened in another group
- closes the editor in that case
This will dispose the file editor and then it cannot be opened anymore because the same editor input that is already being used will be used in the resolver too.
Steps to reproduce:
- set
singlePerResource: trueinregisterDefaultEditor - open a file
- open an empty group to the side
- focus that empty group
- open quick open
- select the file
=> 🐛 all editors close
I am not sure what should happen here actually, but I believe we would have similar problems if the editor to close is actually dirty and would thus bring up a save dialog. Would a better model be to not close the editor but move it to the target group if possible?