about summary refs log tree commit diff
path: root/editors/code/src/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/util.ts')
-rw-r--r--editors/code/src/util.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts
index 793c481fb68..352ef9162f3 100644
--- a/editors/code/src/util.ts
+++ b/editors/code/src/util.ts
@@ -94,3 +94,8 @@ export function isValidExecutable(path: string): boolean {
 
     return res.status === 0;
 }
+
+/** Sets ['when'](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) clause contexts */
+export function setContextValue(key: string, value: any): Thenable<void> {
+    return vscode.commands.executeCommand('setContext', key, value);
+}