提交 003abb01 编写于 作者: J Johannes Rieken

don't dispose results for API command too early, fixes #75208

上级 6a7e5dbd
......@@ -132,6 +132,7 @@ registerLanguageCommand('_executeCodeActionProvider', async function (accessor,
model.validateRange(range),
{ type: 'manual', filter: { includeSourceActions: true, kind: kind && kind.value ? new CodeActionKind(kind.value) : undefined } },
CancellationToken.None);
codeActionSet.dispose();
setTimeout(() => codeActionSet.dispose(), 0);
return codeActionSet.actions;
});
......@@ -101,7 +101,7 @@ registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) {
}
}
return Promise.all(resolve).finally(() => value.dispose());
return Promise.all(resolve).finally(() => setTimeout(() => value.dispose(), 0));
}).then(() => {
return result;
......
......@@ -278,7 +278,7 @@ registerDefaultLanguageCommand('_executeCompletionItemProvider', async (model, p
await Promise.all(resolving);
return result;
} finally {
disposables.dispose();
setTimeout(() => disposables.dispose(), 0);
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册