mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Make sure we update js/ts diagnostics when the visible editors change
Changes in one document may cause errors in other, not yet visible docs. Make sure we update the diagnostics when another file becomes visible to handle that case
This commit is contained in:
@@ -349,6 +349,14 @@ export default class BufferSyncSupport extends Disposable {
|
||||
vscode.workspace.onDidOpenTextDocument(this.openTextDocument, this, this._disposables);
|
||||
vscode.workspace.onDidCloseTextDocument(this.onDidCloseTextDocument, this, this._disposables);
|
||||
vscode.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, this._disposables);
|
||||
vscode.window.onDidChangeVisibleTextEditors(e => {
|
||||
for (const { document } of e) {
|
||||
const syncedBuffer = this.syncedBuffers.get(document.uri);
|
||||
if (syncedBuffer) {
|
||||
this.requestDiagnostic(syncedBuffer);
|
||||
}
|
||||
}
|
||||
}, this, this._disposables);
|
||||
vscode.workspace.textDocuments.forEach(this.openTextDocument, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user