Skip to content

Commit

Permalink
give extension host some time to leave the event loop before disposin…
Browse files Browse the repository at this point in the history
…g command results, #79805
  • Loading branch information
jrieken committed Aug 28, 2019
1 parent 5dbbdd8 commit 4b0a83d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/codeAction/codeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ registerLanguageCommand('_executeCodeActionProvider', async function (accessor,
{ type: 'manual', filter: { includeSourceActions: true, kind: kind && kind.value ? new CodeActionKind(kind.value) : undefined } },
CancellationToken.None);

setTimeout(() => codeActionSet.dispose(), 0);
setTimeout(() => codeActionSet.dispose(), 100);
return codeActionSet.actions;
});
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/codelens/codelens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) {
}).finally(() => {
// make sure to return results, then (on next tick)
// dispose the results
setTimeout(() => disposables.dispose(), 0);
setTimeout(() => disposables.dispose(), 100);
});
});
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/suggest/suggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ registerDefaultLanguageCommand('_executeCompletionItemProvider', async (model, p
await Promise.all(resolving);
return result;
} finally {
setTimeout(() => disposables.dispose(), 0);
setTimeout(() => disposables.dispose(), 100);
}
});

Expand Down

0 comments on commit 4b0a83d

Please sign in to comment.