diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 01b9ef29fea..abb00af22ba 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1341,6 +1341,10 @@ export class CommandCenter { } await repository.move(from, to); + + // Close active editor and open the renamed file + await commands.executeCommand('workbench.action.closeActiveEditor'); + await commands.executeCommand('vscode.open', Uri.file(path.join(repository.root, to)), { viewColumn: ViewColumn.Active }); } @command('git.stage')