mirror of
https://github.com/coder/code-server.git
synced 2026-05-07 12:57:26 +02:00
Update to VS Code 1.52.1
This commit is contained in:
@@ -383,14 +383,9 @@ function printWhenExplanation(when: ContextKeyExpression | undefined): string {
|
||||
}
|
||||
|
||||
function printSourceExplanation(kb: ResolvedKeybindingItem): string {
|
||||
if (kb.isDefault) {
|
||||
if (kb.extensionId) {
|
||||
return `built-in extension ${kb.extensionId}`;
|
||||
}
|
||||
return `built-in`;
|
||||
}
|
||||
if (kb.extensionId) {
|
||||
return `user extension ${kb.extensionId}`;
|
||||
}
|
||||
return `user`;
|
||||
return (
|
||||
kb.extensionId
|
||||
? (kb.isBuiltinExtension ? `built-in extension ${kb.extensionId}` : `user extension ${kb.extensionId}`)
|
||||
: (kb.isDefault ? `built-in` : `user`)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export interface IKeybindingItem {
|
||||
weight1: number;
|
||||
weight2: number;
|
||||
extensionId: string | null;
|
||||
isBuiltinExtension: boolean;
|
||||
}
|
||||
|
||||
export interface IKeybindings {
|
||||
@@ -53,6 +54,7 @@ export interface IKeybindingRule2 {
|
||||
weight: number;
|
||||
when: ContextKeyExpression | undefined;
|
||||
extensionId?: string;
|
||||
isBuiltinExtension?: boolean;
|
||||
}
|
||||
|
||||
export const enum KeybindingWeight {
|
||||
@@ -164,7 +166,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
|
||||
when: rule.when,
|
||||
weight1: rule.weight,
|
||||
weight2: 0,
|
||||
extensionId: rule.extensionId || null
|
||||
extensionId: rule.extensionId || null,
|
||||
isBuiltinExtension: rule.isBuiltinExtension || false
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -223,7 +226,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry {
|
||||
when: when,
|
||||
weight1: weight1,
|
||||
weight2: weight2,
|
||||
extensionId: null
|
||||
extensionId: null,
|
||||
isBuiltinExtension: false
|
||||
});
|
||||
this._cachedMergedKeybindings = null;
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@ export class ResolvedKeybindingItem {
|
||||
public readonly when: ContextKeyExpression | undefined;
|
||||
public readonly isDefault: boolean;
|
||||
public readonly extensionId: string | null;
|
||||
public readonly isBuiltinExtension: boolean;
|
||||
|
||||
constructor(resolvedKeybinding: ResolvedKeybinding | undefined, command: string | null, commandArgs: any, when: ContextKeyExpression | undefined, isDefault: boolean, extensionId: string | null) {
|
||||
constructor(resolvedKeybinding: ResolvedKeybinding | undefined, command: string | null, commandArgs: any, when: ContextKeyExpression | undefined, isDefault: boolean, extensionId: string | null, isBuiltinExtension: boolean) {
|
||||
this.resolvedKeybinding = resolvedKeybinding;
|
||||
this.keypressParts = resolvedKeybinding ? removeElementsAfterNulls(resolvedKeybinding.getDispatchParts()) : [];
|
||||
this.bubble = (command ? command.charCodeAt(0) === CharCode.Caret : false);
|
||||
@@ -28,6 +29,7 @@ export class ResolvedKeybindingItem {
|
||||
this.when = when;
|
||||
this.isDefault = isDefault;
|
||||
this.extensionId = extensionId;
|
||||
this.isBuiltinExtension = isBuiltinExtension;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user