Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor.addAction keybindings #246

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion scripts/vscode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ index 23d547570e9..31dfb4fd8d4 100644

export * from 'vs/editor/editor.api';
diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts
index 01f2c6987ac..fcd285d22b5 100644
index 01f2c6987ac..a4853357178 100644
--- a/src/vs/editor/standalone/browser/standaloneServices.ts
+++ b/src/vs/editor/standalone/browser/standaloneServices.ts
@@ -89,8 +89,6 @@ import { DefaultConfiguration } from 'vs/platform/configuration/common/configura
Expand Down Expand Up @@ -425,6 +425,15 @@ index 01f2c6987ac..fcd285d22b5 100644
this._cachedResolver = new KeybindingResolver(defaults, overrides, (str) => this._log(str));
}
return this._cachedResolver;
@@ -541,7 +543,7 @@ export class StandaloneKeybindingService extends AbstractKeybindingService {
// This might be a removal keybinding item in user settings => accept it
result[resultLen++] = new ResolvedKeybindingItem(undefined, item.command, item.commandArgs, when, isDefault, null, false);
} else {
- const resolvedKeybindings = USLayoutResolvedKeybinding.resolveKeybinding(keybinding, OS);
+ const resolvedKeybindings = this.resolveKeybinding(keybinding);
for (const resolvedKeybinding of resolvedKeybindings) {
result[resultLen++] = new ResolvedKeybindingItem(resolvedKeybinding, item.command, item.commandArgs, when, isDefault, null, false);
}
@@ -1155,16 +1157,6 @@ export module StandaloneServices {
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService
import { IKeybindingService, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'
import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingResolver'
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'
import { ResolvedKeybinding } from 'vs/base/common/keybindings'
import { Keybinding, ResolvedKeybinding } from 'vs/base/common/keybindings'
import { createInjectedClass } from './tools/injection'
// Selectively comes from vs/workbench/contrib/codeEditor/browser/codeEditor.contribution.ts
import 'vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch'
Expand Down Expand Up @@ -216,6 +216,10 @@ class DelegateStandaloneKeybindingService extends StandaloneKeybindingService {
override resolveKeyboardEvent (keyboardEvent: IKeyboardEvent): ResolvedKeybinding {
return this.delegate.resolveKeyboardEvent(keyboardEvent)
}

override resolveKeybinding (keybinding: Keybinding): ResolvedKeybinding[] {
return this.delegate.resolveKeybinding(keybinding)
}
}

let standaloneEditorInstantiationService: IInstantiationService | null = null
Expand Down