Skip to content

Opened editor can end up empty after a file change on disk #138850

@bpasero

Description

@bpasero

We queue a reload of opened text editors when we detect file changes. In a refactoring in 25a8b89#diff-817d91ef3745344e25e009979bbc7fff1f16ec7320f121e4eb767ae7d3bf4a88 the code is now using the same code that was used when creating/resolving a model, but the downside is that this code will dispose a model when it failed to resolve:

Previously we would simply ignore this error.

This is not a regression though maybe it is a bit more evident now with the new file watcher.

//cc @jrieken you noticed that when opened editors reloaded from file changes. the consequence is that the editor will be empty because we clear out the model

Metadata

Metadata

Assignees

Labels

importantIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code Insidersworkbench-editorsManaging of editor widgets in workbench window

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions