chore(vscode): update to 1.56.0
This commit is contained in:
BIN
lib/vscode/extensions/merge-conflict/media/icon.png
Normal file
BIN
lib/vscode/extensions/merge-conflict/media/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@ -3,7 +3,7 @@
|
||||
"publisher": "vscode",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"icon": "resources/icons/merge-conflict.png",
|
||||
"icon": "media/icon.png",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
||||
@ -13,6 +13,12 @@
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"capabilities": {
|
||||
"virtualWorkspaces": false,
|
||||
"untrustedWorkspaces": {
|
||||
"supported": true
|
||||
}
|
||||
},
|
||||
"activationEvents": [
|
||||
"onStartupFinished"
|
||||
],
|
||||
@ -70,13 +76,15 @@
|
||||
"category": "%command.category%",
|
||||
"title": "%command.next%",
|
||||
"original": "Next Conflict",
|
||||
"command": "merge-conflict.next"
|
||||
"command": "merge-conflict.next",
|
||||
"icon": "$(arrow-down)"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
"title": "%command.previous%",
|
||||
"original": "Previous Conflict",
|
||||
"command": "merge-conflict.previous"
|
||||
"command": "merge-conflict.previous",
|
||||
"icon": "$(arrow-up)"
|
||||
},
|
||||
{
|
||||
"category": "%command.category%",
|
||||
@ -97,6 +105,18 @@
|
||||
"when": "scmProvider == git && scmResourceGroup == merge",
|
||||
"group": "1_modification"
|
||||
}
|
||||
],
|
||||
"editor/title": [
|
||||
{
|
||||
"command": "merge-conflict.previous",
|
||||
"group": "navigation@1",
|
||||
"when": "mergeConflictsCount && mergeConflictsCount != 0"
|
||||
},
|
||||
{
|
||||
"command": "merge-conflict.next",
|
||||
"group": "navigation@2",
|
||||
"when": "mergeConflictsCount && mergeConflictsCount != 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"configuration": {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
@ -53,8 +53,10 @@ export default class MergeConflictCodeLensProvider implements vscode.CodeLensPro
|
||||
}
|
||||
|
||||
let conflicts = await this.tracker.getConflicts(document);
|
||||
const conflictsCount = conflicts?.length ?? 0;
|
||||
vscode.commands.executeCommand('setContext', 'mergeConflictsCount', conflictsCount);
|
||||
|
||||
if (!conflicts || conflicts.length === 0) {
|
||||
if (!conflictsCount) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -99,6 +101,7 @@ export default class MergeConflictCodeLensProvider implements vscode.CodeLensPro
|
||||
private registerCodeLensProvider() {
|
||||
this.codeLensRegistrationHandle = vscode.languages.registerCodeLensProvider([
|
||||
{ scheme: 'file' },
|
||||
{ scheme: 'vscode-vfs' },
|
||||
{ scheme: 'untitled' },
|
||||
{ scheme: 'vscode-userdata' },
|
||||
], this);
|
||||
|
@ -339,18 +339,21 @@ export default class CommandHandler implements vscode.Disposable {
|
||||
|
||||
let predicate: (_conflict: any) => boolean;
|
||||
let fallback: () => interfaces.IDocumentMergeConflict;
|
||||
let scanOrder: interfaces.IDocumentMergeConflict[];
|
||||
|
||||
if (direction === NavigationDirection.Forwards) {
|
||||
predicate = (conflict) => selection.isBefore(conflict.range.start);
|
||||
fallback = () => conflicts![0];
|
||||
scanOrder = conflicts;
|
||||
} else if (direction === NavigationDirection.Backwards) {
|
||||
predicate = (conflict) => selection.isAfter(conflict.range.start);
|
||||
fallback = () => conflicts![conflicts!.length - 1];
|
||||
scanOrder = conflicts.slice().reverse();
|
||||
} else {
|
||||
throw new Error(`Unsupported direction ${direction}`);
|
||||
}
|
||||
|
||||
for (const conflict of conflicts) {
|
||||
for (const conflict of scanOrder) {
|
||||
if (predicate(conflict) && !conflict.range.contains(selection)) {
|
||||
return {
|
||||
canNavigate: true,
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"extends": "../shared.tsconfig.json",
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user