Browse Source

Fixes changes hover with renamed files

main
Eric Amodio 5 years ago
parent
commit
10a3b7e279
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      src/annotations/annotations.ts

+ 8
- 7
src/annotations/annotations.ts View File

@ -184,14 +184,15 @@ export class Annotations {
const line = editorLine + 1;
const commitLine = commit.lines.find(l => l.line === line) || commit.lines[0];
let originalFileName = commit.originalFileName;
if (originalFileName === undefined) {
if (uri.fsPath !== commit.uri.fsPath) {
originalFileName = commit.fileName;
}
}
const commitEditorLine = commitLine.originalLine - 1;
const hunkLine = await Container.git.getDiffForLine(
uri,
commitEditorLine,
ref,
undefined,
commit.originalFileName
);
const hunkLine = await Container.git.getDiffForLine(uri, commitEditorLine, ref, undefined, originalFileName);
const message = this.getHoverDiffMessage(commit, uri, hunkLine, commitEditorLine);
return {

Loading…
Cancel
Save