Skip to content

Commit 705fe98

Browse files
committed
1 parent 75811f2 commit 705fe98

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

src/vs/platform/keybinding/common/keybindingResolver.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ export interface IResolveResult {
1919
export class KeybindingResolver {
2020
private readonly _defaultKeybindings: ResolvedKeybindingItem[];
2121
private readonly _keybindings: ResolvedKeybindingItem[];
22-
private readonly _shouldWarnOnConflict: boolean;
2322
private readonly _defaultBoundCommands: Map<string, boolean>;
2423
private readonly _map: Map<string, ResolvedKeybindingItem[]>;
2524
private readonly _lookupMap: Map<string, ResolvedKeybindingItem[]>;
2625

27-
constructor(defaultKeybindings: ResolvedKeybindingItem[], overrides: ResolvedKeybindingItem[], shouldWarnOnConflict: boolean = true) {
26+
constructor(defaultKeybindings: ResolvedKeybindingItem[], overrides: ResolvedKeybindingItem[]) {
2827
this._defaultKeybindings = defaultKeybindings;
29-
this._shouldWarnOnConflict = shouldWarnOnConflict;
3028

3129
this._defaultBoundCommands = new Map<string, boolean>();
3230
for (let i = 0, len = defaultKeybindings.length; i < len; i++) {
@@ -125,10 +123,6 @@ export class KeybindingResolver {
125123

126124
if (KeybindingResolver.whenIsEntirelyIncluded(true, conflict.when, item.when)) {
127125
// `item` completely overwrites `conflict`
128-
if (this._shouldWarnOnConflict && item.isDefault) {
129-
console.warn('Conflict detected, command `' + conflict.command + '` cannot be triggered due to ' + item.command);
130-
}
131-
132126
// Remove conflict from the lookupMap
133127
this._removeFromLookupMap(conflict);
134128
}

src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ suite('AbstractKeybindingService', () => {
140140
}
141141
};
142142

143-
let resolver = new KeybindingResolver(items, [], false);
143+
let resolver = new KeybindingResolver(items, []);
144144

145145
return new TestKeybindingService(resolver, contextKeyService, commandService, messageService, statusbarService);
146146
};

src/vs/platform/keybinding/test/common/keybindingResolver.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ suite('KeybindingResolver', () => {
322322
)
323323
];
324324

325-
let resolver = new KeybindingResolver(items, [], false);
325+
let resolver = new KeybindingResolver(items, []);
326326

327327
let testKey = (commandId: string, expectedKeys: number[]) => {
328328
// Test lookup

0 commit comments

Comments
 (0)