mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
fix: restore old behavior of not preventing default and not executing keybindings with empty command ID bound (#181920)
* abstractKeybindingService: fix: don't try executing keybindings with empty command IDs * abstractKeybindingService: fix: restore old behavior that wouldn't prevent default if the keybinding has an empty command ID (unless the keybinding consists of more than one chord)
This commit is contained in:
parent
331e290063
commit
6ec9831bf4
|
@ -342,17 +342,16 @@ export abstract class AbstractKeybindingService extends Disposable implements IK
|
|||
|
||||
this._logService.trace('KeybindingService#dispatch', keypressLabel, `[ Will dispatch command ${resolveResult.commandId} ]`);
|
||||
|
||||
if (resolveResult.commandId === null) {
|
||||
if (resolveResult.commandId === null || resolveResult.commandId === '') {
|
||||
|
||||
if (this.inChordMode) {
|
||||
const currentChordsLabel = this._currentChords.map(({ label }) => label).join(', ');
|
||||
this._log(`+ Leaving chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);
|
||||
this._notificationService.status(nls.localize('missing.chord', "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
|
||||
this._leaveChordMode();
|
||||
shouldPreventDefault = true;
|
||||
}
|
||||
|
||||
shouldPreventDefault = true;
|
||||
|
||||
} else {
|
||||
if (this.inChordMode) {
|
||||
this._leaveChordMode();
|
||||
|
|
Loading…
Reference in a new issue