Skip to content

Commit a5987ce

Browse files
author
Eric Amodio
committed
Fixes focus issue on click
1 parent a4adeb8 commit a5987ce

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

extensions/git/src/commands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,13 @@ export class CommandCenter {
23602360
title = localize('git.title.diffRefs', '{0} ({1}) ⟷ {0} ({2})', basename, item.shortPreviousRef, item.shortRef);
23612361
}
23622362

2363-
return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title);
2363+
const options: TextDocumentShowOptions = {
2364+
preserveFocus: true,
2365+
preview: true,
2366+
viewColumn: ViewColumn.Active
2367+
};
2368+
2369+
return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options);
23642370
}
23652371

23662372
@command('git.timeline.copyCommitId', { repository: false })

0 commit comments

Comments
 (0)