Ver a proveniência

Fixes #2549 codelens toggle when enabled is false

main
Keith Daulton há 1 ano
ascendente
cometimento
48bad3f320
1 ficheiros alterados com 1 adições e 3 eliminações
  1. +1
    -3
      src/codelens/codeLensProvider.ts

+ 1
- 3
src/codelens/codeLensProvider.ts Ver ficheiro

@ -100,9 +100,6 @@ export class GitCodeLensProvider implements CodeLensProvider {
// Since we can't currently blame edited virtual documents, don't even attempt anything if dirty // Since we can't currently blame edited virtual documents, don't even attempt anything if dirty
if (document.isDirty && isVirtualUri(document.uri)) return []; if (document.isDirty && isVirtualUri(document.uri)) return [];
const cfg = configuration.get('codeLens', document);
if (!cfg.enabled) return [];
const trackedDocument = await this.container.tracker.getOrAdd(document); const trackedDocument = await this.container.tracker.getOrAdd(document);
if (!trackedDocument.isBlameable) return []; if (!trackedDocument.isBlameable) return [];
@ -119,6 +116,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
} }
} }
const cfg = configuration.get('codeLens', document);
let languageScope = cfg.scopesByLanguage?.find(ll => ll.language?.toLowerCase() === document.languageId); let languageScope = cfg.scopesByLanguage?.find(ll => ll.language?.toLowerCase() === document.languageId);
if (languageScope == null) { if (languageScope == null) {
languageScope = { languageScope = {

Carregando…
Cancelar
Guardar