Skip to content

Commit e8c47c4

Browse files
committed
Fixes missing hovers in revisions
1 parent f81dfd0 commit e8c47c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/annotations/blameAnnotationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
7575
}
7676

7777
registerHoverProvider() {
78-
this._hoverProviderDisposable = languages.registerHoverProvider({ pattern: this.uri.fsPath }, this);
78+
this._hoverProviderDisposable = languages.registerHoverProvider({ pattern: this.document.uri.fsPath }, this);
7979
}
8080

8181
async provideHover(document: TextDocument, position: Position, token: CancellationToken): Promise<Hover | undefined> {

src/gitService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ export class GitService extends Disposable {
11211121
shortSha = shaOrcommitOrUri.shortSha;
11221122
}
11231123

1124-
const extension = path.extname(fileName!);
1125-
return Uri.parse(`${DocumentSchemes.GitLensGit}:${path.basename(fileName!, extension)}:${shortSha}${extension}?${JSON.stringify(data)}`);
1124+
const parsed = path.parse(fileName!);
1125+
return Uri.parse(`${DocumentSchemes.GitLensGit}:${parsed.dir}${parsed.name}:${shortSha}${parsed.ext}?${JSON.stringify(data)}`);
11261126
}
11271127

11281128
private static _toGitUriData<T extends IGitUriData>(commit: IGitUriData, originalFileName?: string): T {

0 commit comments

Comments
 (0)