mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
show "Accept Merge" only for files currently under conflict. (#155822)
While the merge editor shows users can handle merge conflicts outside of it, e.g on the console via `git add <FILE>`. The merge editor should have this graceful and step one is to hide the "Accept Merge" command when the file isn't conflicting anymore * Adds a git-context key that contains all resource-uri-strings under conflict * Enable/placement of the Accept Merge command is driven by that * some merge editor context key sugar
This commit is contained in:
@@ -601,7 +601,7 @@
|
||||
"command": "git.acceptMerge",
|
||||
"title": "%command.git.acceptMerge%",
|
||||
"category": "Git",
|
||||
"enablement": "isMergeEditor"
|
||||
"enablement": "isMergeEditor && mergeEditorResultUri in git.mergeChanges"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
@@ -1549,7 +1549,7 @@
|
||||
"merge/toolbar": [
|
||||
{
|
||||
"command": "git.acceptMerge",
|
||||
"when": "isMergeEditor && baseResourceScheme =~ /^git$|^file$/"
|
||||
"when": "isMergeEditor && mergeEditorBaseUri =~ /^(git|file):/ && mergeEditorResultUri in git.mergeChanges"
|
||||
}
|
||||
],
|
||||
"scm/change/title": [
|
||||
|
||||
Reference in New Issue
Block a user