Open enums with Alt+Space (also non-breaking)

This commit is contained in:
Cohee 2024-06-21 23:32:17 +03:00
parent da6d77cffd
commit 62bc550d3a
1 changed files with 5 additions and 1 deletions

View File

@ -750,8 +750,10 @@ export class AutoComplete {
}
// autocomplete shown or not, cursor anywhere
switch (evt.key) {
// The first is a non-breaking space, the second is a regular space.
case ' ':
case ' ': {
if (evt.ctrlKey) {
if (evt.ctrlKey || evt.altKey) {
if (this.isActive && this.isReplaceable) {
// ctrl-space to toggle details for selected item
this.toggleDetails();
@ -759,6 +761,8 @@ export class AutoComplete {
// ctrl-space to force show autocomplete
this.show(false, true);
}
evt.preventDefault();
evt.stopPropagation();
return;
}
break;