浏览代码

Fixes changes hover not showing the correct diff when showing recent changes annotations

main
Eric Amodio 7 年前
父节点
当前提交
55ef004332
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      src/annotations/recentChangesAnnotationProvider.ts

+ 2
- 1
src/annotations/recentChangesAnnotationProvider.ts 查看文件

@ -50,7 +50,8 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
let message: string | undefined = undefined;
if (cfg.hover.changes) {
message = Annotations.getHoverDiffMessage(commit, chunk.previous[count], change);
const previousPos = count - (chunk.previousPosition.start + (chunk.previousPosition.start - chunk.currentPosition.start)) + 1;
message = Annotations.getHoverDiffMessage(commit, chunk.previous[previousPos], change);
}
decorators.push({

正在加载...
取消
保存