From a5987ce853b0cd757f140f4618962a4e12522224 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 23 Mar 2020 17:15:18 -0400 Subject: [PATCH] Fixes focus issue on click --- extensions/git/src/commands.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index a27fa783fc0..451ff28afca 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -2360,7 +2360,13 @@ export class CommandCenter { title = localize('git.title.diffRefs', '{0} ({1}) ⟷ {0} ({2})', basename, item.shortPreviousRef, item.shortRef); } - return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title); + const options: TextDocumentShowOptions = { + preserveFocus: true, + preview: true, + viewColumn: ViewColumn.Active + }; + + return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options); } @command('git.timeline.copyCommitId', { repository: false })