@codingame/monaco-vscode-keybindings-service-override 19.0.2 → 19.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -1
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -46,6 +46,7 @@ let DynamicWorkbenchKeybindingService = class DynamicWorkbenchKeybindingService
|
|
|
46
46
|
super(contextKeyService, commandService, telemetryService, notificationService, userDataProfileService, hostService, extensionService, fileService, uriIdentityService, logService, keyboardLayoutService);
|
|
47
47
|
this.shouldUseGlobalKeybindings = shouldUseGlobalKeybindings;
|
|
48
48
|
this.keybindingProviders = [];
|
|
49
|
+
this.authorizedContainers = [];
|
|
49
50
|
}
|
|
50
51
|
registerKeybindingProvider(provider) {
|
|
51
52
|
this.keybindingProviders.push(provider);
|
|
@@ -66,8 +67,18 @@ let DynamicWorkbenchKeybindingService = class DynamicWorkbenchKeybindingService
|
|
|
66
67
|
_getResolver() {
|
|
67
68
|
return super._getResolver();
|
|
68
69
|
}
|
|
70
|
+
registerContainer(container) {
|
|
71
|
+
const disposableStore = new DisposableStore();
|
|
72
|
+
disposableStore.add(super.registerContainer(container));
|
|
73
|
+
this.authorizedContainers.push(container);
|
|
74
|
+
disposableStore.add(toDisposable(() => {
|
|
75
|
+
this.authorizedContainers = this.authorizedContainers.filter((c) => c != container);
|
|
76
|
+
}));
|
|
77
|
+
return disposableStore;
|
|
78
|
+
}
|
|
69
79
|
_dispatch(e, target) {
|
|
70
|
-
if (!this.shouldUseGlobalKeybindings()
|
|
80
|
+
if (!this.shouldUseGlobalKeybindings() &&
|
|
81
|
+
this.authorizedContainers.every((container) => !container.contains(e.target))) {
|
|
71
82
|
return false;
|
|
72
83
|
}
|
|
73
84
|
return super._dispatch(e, target);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-keybindings-service-override",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - keybindings service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-273022ab-b991-5d6a-9f04-decc266cb61b-common": "19.
|
|
19
|
-
"@codingame/monaco-vscode-2a22c7b4-b906-5914-8cd1-3ed912fb738f-common": "19.
|
|
20
|
-
"@codingame/monaco-vscode-40cada32-7e9c-528a-81fc-766e4da54147-common": "19.
|
|
21
|
-
"@codingame/monaco-vscode-a3eaa464-944c-5b8f-8886-213068ba4897-common": "19.
|
|
22
|
-
"@codingame/monaco-vscode-api": "19.
|
|
23
|
-
"@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "19.
|
|
24
|
-
"@codingame/monaco-vscode-files-service-override": "19.
|
|
18
|
+
"@codingame/monaco-vscode-273022ab-b991-5d6a-9f04-decc266cb61b-common": "19.1.1",
|
|
19
|
+
"@codingame/monaco-vscode-2a22c7b4-b906-5914-8cd1-3ed912fb738f-common": "19.1.1",
|
|
20
|
+
"@codingame/monaco-vscode-40cada32-7e9c-528a-81fc-766e4da54147-common": "19.1.1",
|
|
21
|
+
"@codingame/monaco-vscode-a3eaa464-944c-5b8f-8886-213068ba4897-common": "19.1.1",
|
|
22
|
+
"@codingame/monaco-vscode-api": "19.1.1",
|
|
23
|
+
"@codingame/monaco-vscode-d609a7d3-bf87-551a-884f-550a8b327ec5-common": "19.1.1",
|
|
24
|
+
"@codingame/monaco-vscode-files-service-override": "19.1.1"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"module": "index.js",
|