Skip to content

Commit

Permalink
feat: do not switch focus after commits if same-column is set
Browse files Browse the repository at this point in the history
  • Loading branch information
aldum committed Nov 29, 2024
1 parent 92869ba commit 43f3c55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/commitCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ export async function runCommitLikeCommand(repository: MagitRepository, args: st
const stagedEditorViewColumn = ViewUtils.showDocumentColumn();
await vscode.window.showTextDocument(stagedEditor.document, { viewColumn: stagedEditorViewColumn, preview: false });
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
vscode.commands.executeCommand(`workbench.action.navigate${stagedEditorViewColumn === vscode.ViewColumn.One ? 'Right' : 'Left'}`);
if (! magitConfig.displayBufferSameColumn) {
vscode.commands.executeCommand(`workbench.action.navigate${stagedEditorViewColumn === vscode.ViewColumn.One ? 'Right' : 'Left'}`);
}
}
}
}
Expand Down

0 comments on commit 43f3c55

Please sign in to comment.