Re-queue canceled geterr requests before remaining buffers
We should give higher priority to files that have previously had geterr triggered on them but did not have their request completed
This commit is contained in:
parent
7679015e6f
commit
8b93c01655
1 changed files with 8 additions and 8 deletions
|
@ -470,20 +470,20 @@ export default class BufferSyncSupport extends Disposable {
|
|||
private sendPendingDiagnostics(): void {
|
||||
const orderedFileSet = this.pendingDiagnostics.getOrderedFileSet();
|
||||
|
||||
if (this.pendingGetErr) {
|
||||
this.pendingGetErr.cancel();
|
||||
|
||||
for (const file of this.pendingGetErr.files.entries) {
|
||||
orderedFileSet.set(file.resource, undefined);
|
||||
}
|
||||
}
|
||||
|
||||
// Add all open TS buffers to the geterr request. They might be visible
|
||||
for (const buffer of this.syncedBuffers.values) {
|
||||
orderedFileSet.set(buffer.resource, undefined);
|
||||
}
|
||||
|
||||
if (orderedFileSet.size) {
|
||||
if (this.pendingGetErr) {
|
||||
this.pendingGetErr.cancel();
|
||||
|
||||
for (const file of this.pendingGetErr.files.entries) {
|
||||
orderedFileSet.set(file.resource, undefined);
|
||||
}
|
||||
}
|
||||
|
||||
const getErr = this.pendingGetErr = GetErrRequest.executeGetErrRequest(this.client, orderedFileSet, () => {
|
||||
if (this.pendingGetErr === getErr) {
|
||||
this.pendingGetErr = undefined;
|
||||
|
|
Loading…
Reference in a new issue