properly keep resolved code lens command, #74846

This commit is contained in:
Johannes Rieken
2019-06-05 09:21:02 +02:00
parent be547e26fc
commit a73b4236b0

View File

@@ -145,7 +145,8 @@ class CodeLensAdapter {
resolveCodeLens(symbol: CodeLensDto, token: CancellationToken): Promise<CodeLensDto | undefined> {
const lens = symbol.cacheId && this._cache.get(...symbol.cacheId);
if (!lens) {
const disposables = symbol.cacheId && this._disposables.get(symbol.cacheId[0]);
if (!lens || !disposables) {
return Promise.resolve(undefined);
}
@@ -158,7 +159,7 @@ class CodeLensAdapter {
return resolve.then(newLens => {
newLens = newLens || lens;
symbol.command = this._commands.toInternal(newLens.command || CodeLensAdapter._badCmd);
symbol.command = this._commands.toInternal2(newLens.command || CodeLensAdapter._badCmd, disposables);
return symbol;
});
}