From 724ebf4d61ac04276bbb7fb4cb704874040ce1e9 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 29 Aug 2024 12:27:41 +0200 Subject: [PATCH] Joh/friendly-hedgehog (#227056) * Revert "disable code lense for the output editor (#226971)" This reverts commit dea44122439ea522fa19c30463bca1a5b97fc558. * ignore `output` scheme when logging code lens request --- src/vs/workbench/api/common/extHostLanguageFeatures.ts | 6 +++--- src/vs/workbench/contrib/output/browser/outputView.ts | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/common/extHostLanguageFeatures.ts b/src/vs/workbench/api/common/extHostLanguageFeatures.ts index 50ab3ea6729..5bb629a6c09 100644 --- a/src/vs/workbench/api/common/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/common/extHostLanguageFeatures.ts @@ -2312,15 +2312,15 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF } $provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise { - return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(URI.revive(resource), token), undefined, token); + return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(URI.revive(resource), token), undefined, token, resource.scheme === 'output'); } $resolveCodeLens(handle: number, symbol: extHostProtocol.ICodeLensDto, token: CancellationToken): Promise { - return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(symbol, token), undefined, undefined); + return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(symbol, token), undefined, undefined, true); } $releaseCodeLenses(handle: number, cacheId: number): void { - this._withAdapter(handle, CodeLensAdapter, adapter => Promise.resolve(adapter.releaseCodeLenses(cacheId)), undefined, undefined); + this._withAdapter(handle, CodeLensAdapter, adapter => Promise.resolve(adapter.releaseCodeLenses(cacheId)), undefined, undefined, true); } // --- declaration diff --git a/src/vs/workbench/contrib/output/browser/outputView.ts b/src/vs/workbench/contrib/output/browser/outputView.ts index 50d0ab01a9c..9a23e945d85 100644 --- a/src/vs/workbench/contrib/output/browser/outputView.ts +++ b/src/vs/workbench/contrib/output/browser/outputView.ts @@ -185,7 +185,6 @@ class OutputEditor extends AbstractTextResourceEditor { options.lineDecorationsWidth = 20; options.rulers = []; options.folding = false; - options.codeLens = false; options.scrollBeyondLastLine = false; options.renderLineHighlight = 'none'; options.minimap = { enabled: false };