Skip to content

Commit

Permalink
Merge pull request #246 from CodinGame/fix-addaction-keybindings
Browse files Browse the repository at this point in the history
Fix editor.addAction keybindings
  • Loading branch information
CGNonofr authored Nov 14, 2023
2 parents f079eb2 + f29f098 commit e65fbd4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
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

0 comments on commit e65fbd4

Please sign in to comment.