Browse Source

Fixes recent changes annotations

main
Eric Amodio 7 years ago
parent
commit
1b0d516b01
4 changed files with 5 additions and 5 deletions
  1. +2
    -0
      src/annotations/recentChangesAnnotationProvider.ts
  2. +1
    -4
      src/commands.ts
  3. +1
    -1
      src/commands/clearFileAnnotations.ts
  4. +1
    -0
      src/commands/common.ts

+ 2
- 0
src/annotations/recentChangesAnnotationProvider.ts View File

@ -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<boolean> {

+ 1
- 4
src/commands.ts View File

@ -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());

+ 1
- 1
src/commands/clearFileAnnotations.ts View File

@ -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<any> {

+ 1
- 0
src/commands/common.ts View File

@ -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',

Loading…
Cancel
Save