Skip to content

Commit 2006da9

Browse files
authored
Merge pull request microsoft#182030 from microsoft/ulugbekna/fix-empty-command-id
fix: restore old behavior of not preventing default and not executing keybindings with empty command ID bound (microsoft#181920)
2 parents 38879b6 + 2a8cc4c commit 2006da9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,16 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
342342

343343
this._logService.trace('KeybindingService#dispatch', keypressLabel, `[ Will dispatch command ${resolveResult.commandId} ]`);
344344

345-
if (resolveResult.commandId === null) {
345+
if (resolveResult.commandId === null || resolveResult.commandId === '') {
346346

347347
if (this.inChordMode) {
348348
const currentChordsLabel = this._currentChords.map(({ label }) => label).join(', ');
349349
this._log(`+ Leaving chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);
350350
this._notificationService.status(nls.localize('missing.chord', "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
351351
this._leaveChordMode();
352+
shouldPreventDefault = true;
352353
}
353354

354-
shouldPreventDefault = true;
355-
356355
} else {
357356
if (this.inChordMode) {
358357
this._leaveChordMode();

0 commit comments

Comments
 (0)