Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joh/careful silverfish #153089

Merged
merged 3 commits into from Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/git/package.json
Expand Up @@ -1478,7 +1478,7 @@
{
"command": "git.openChange",
"group": "navigation",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file && scmActiveResourceHasChanges"
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && !isMergeEditor && resourceScheme == file && scmActiveResourceHasChanges"
},
{
"command": "git.stageSelectedRanges",
Expand Down
6 changes: 4 additions & 2 deletions extensions/merge-conflict/package.json
Expand Up @@ -77,13 +77,15 @@
"title": "%command.next%",
"original": "Next Conflict",
"command": "merge-conflict.next",
"enablement": "!isMergeEditor",
"icon": "$(arrow-down)"
},
{
"category": "%command.category%",
"title": "%command.previous%",
"original": "Previous Conflict",
"command": "merge-conflict.previous",
"enablement": "!isMergeEditor",
"icon": "$(arrow-up)"
},
{
Expand All @@ -110,12 +112,12 @@
{
"command": "merge-conflict.previous",
"group": "navigation@1",
"when": "mergeConflictsCount && mergeConflictsCount != 0"
"when": "!isMergeEditor && mergeConflictsCount && mergeConflictsCount != 0"
},
{
"command": "merge-conflict.next",
"group": "navigation@2",
"when": "mergeConflictsCount && mergeConflictsCount != 0"
"when": "!isMergeEditor && mergeConflictsCount && mergeConflictsCount != 0"
}
]
},
Expand Down
14 changes: 13 additions & 1 deletion extensions/merge-conflict/src/services.ts
Expand Up @@ -48,6 +48,19 @@ export default class ServiceWrapper implements vscode.Disposable {
}

createExtensionConfiguration(): interfaces.IExtensionConfiguration {

// PRAGMATIC way to avoid conflicting with the new merge editor: when git opts into
// using the merge editor we disable this extension - for the merge editor but also
// for "other" editors
const gitConfig = vscode.workspace.getConfiguration('git');
if (gitConfig.get<boolean>('experimental.mergeEditor')) {
return {
enableCodeLens: false,
enableDecorations: false,
enableEditorOverview: false
};
}

const workspaceConfiguration = vscode.workspace.getConfiguration(ConfigurationSectionName);
const codeLensEnabled: boolean = workspaceConfiguration.get('codeLens.enabled', true);
const decoratorsEnabled: boolean = workspaceConfiguration.get('decorators.enabled', true);
Expand All @@ -64,4 +77,3 @@ export default class ServiceWrapper implements vscode.Disposable {
this.services = [];
}
}