From 83fff1590d69ee905e8fbd52af55ce313e185359 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 14 May 2017 03:02:41 -0400 Subject: [PATCH] Fixes incorrect file selection on commit file details --- src/commands/showQuickCommitFileDetails.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/showQuickCommitFileDetails.ts b/src/commands/showQuickCommitFileDetails.ts index 9aaf369..d56ca01 100644 --- a/src/commands/showQuickCommitFileDetails.ts +++ b/src/commands/showQuickCommitFileDetails.ts @@ -51,7 +51,11 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand } try { - if (args.commit === undefined || (args.commit.type !== 'file' && args.commit.type !== 'stash')) { + if (args.commit === undefined || args.commit.type !== 'file') { + if (args.commit !== undefined) { + workingFileName = undefined; + } + if (args.fileLog !== undefined) { args.commit = args.fileLog.commits.get(args.sha!); // If we can't find the commit, kill the fileLog