diff --git a/src/annotations/recentChangesAnnotationProvider.ts b/src/annotations/recentChangesAnnotationProvider.ts index b771e5e..9f506eb 100644 --- a/src/annotations/recentChangesAnnotationProvider.ts +++ b/src/annotations/recentChangesAnnotationProvider.ts @@ -20,6 +20,8 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase { highlightDecoration: TextEditorDecorationType | undefined ) { super(editor, trackedDocument, decoration, highlightDecoration); + + this._uri = trackedDocument.uri; } async onProvideAnnotation(shaOrLine?: string | number): Promise { diff --git a/src/commands.ts b/src/commands.ts index ca4dc41..fb9fd59 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1,5 +1,5 @@ 'use strict'; -import { commands } from 'vscode'; +import { CommandContext, setCommandContext } from './constants'; import { Container } from './container'; export * from './commands/common'; @@ -49,13 +49,10 @@ export * from './commands/toggleFileRecentChanges'; export * from './commands/toggleLineBlame'; import * as Commands from './commands'; -import { CommandContext, setCommandContext } from './constants'; export function configureCommands(): void { setCommandContext(CommandContext.KeyMap, Container.config.keymap); - Container.context.subscriptions.push(commands.registerTextEditorCommand('gitlens.computingFileAnnotations', () => { })); - Container.context.subscriptions.push(new Commands.CloseUnchangedFilesCommand()); Container.context.subscriptions.push(new Commands.OpenChangedFilesCommand()); Container.context.subscriptions.push(new Commands.ExternalDiffCommand()); diff --git a/src/commands/clearFileAnnotations.ts b/src/commands/clearFileAnnotations.ts index 0dc5a07..91f952e 100644 --- a/src/commands/clearFileAnnotations.ts +++ b/src/commands/clearFileAnnotations.ts @@ -7,7 +7,7 @@ import { Logger } from '../logger'; export class ClearFileAnnotationsCommand extends EditorCommand { constructor() { - super(Commands.ClearFileAnnotations); + super([Commands.ClearFileAnnotations, Commands.ComputingFileAnnotations]); } async execute(editor: TextEditor, edit: TextEditorEdit, uri?: Uri): Promise { diff --git a/src/commands/common.ts b/src/commands/common.ts index f4f4216..c931d51 100644 --- a/src/commands/common.ts +++ b/src/commands/common.ts @@ -8,6 +8,7 @@ import { Logger } from '../logger'; export enum Commands { ClearFileAnnotations = 'gitlens.clearFileAnnotations', CloseUnchangedFiles = 'gitlens.closeUnchangedFiles', + ComputingFileAnnotations = 'gitlens.computingFileAnnotations', CopyMessageToClipboard = 'gitlens.copyMessageToClipboard', CopyShaToClipboard = 'gitlens.copyShaToClipboard', DiffDirectory = 'gitlens.diffDirectory',