提交 c3fe962b 编写于 作者: P Peng Lyu

Open the diff view in current editor, to the side or below.

上级 93944674
......@@ -115,10 +115,15 @@
"description": "%config.autoNavigateNextConflictEnabled%",
"default": false
},
"merge-conflict.openDiffInNewEditor": {
"type": "boolean",
"description": "%config.openDiffInNewEditor%",
"default": false
"merge-conflict.diffViewPosition": {
"type": "string",
"enum": [
"Current",
"Beside",
"Below"
],
"description": "%config.diffViewPosition%",
"default": "Current"
}
}
}
......
......@@ -16,5 +16,5 @@
"config.autoNavigateNextConflictEnabled": "Whether to automatically navigate to the next merge conflict after resolving a merge conflict.",
"config.codeLensEnabled": "Create a Code Lens for merge conflict blocks within editor.",
"config.decoratorsEnabled": "Create decorators for merge conflict blocks within editor.",
"config.openDiffInNewEditor": "Controls if the diff view should be opened in a new editor group when comparing changes in merge conflicts."
"config.diffViewPosition": "Controls where the diff view should be opened when comparing changes in merge conflicts."
}
\ No newline at end of file
......@@ -125,13 +125,13 @@ export default class CommandHandler implements vscode.Disposable {
const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName);
const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict');
const openToTheSide = mergeConflictConfig.get<boolean>('openDiffInNewEditor');
const openToTheSide = mergeConflictConfig.get<string>('diffViewPosition');
const opts: vscode.TextDocumentShowOptions = {
viewColumn: vscode.ViewColumn.Active,
viewColumn: openToTheSide === 'Beside' ? vscode.ViewColumn.Beside : vscode.ViewColumn.Active,
selection
};
if (openToTheSide) {
if (openToTheSide === 'Below') {
await vscode.commands.executeCommand('workbench.action.newGroupBelow');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册