From 924df2360f51baba76d14ca9b53d70a8da202bef Mon Sep 17 00:00:00 2001 From: David Little Date: Thu, 24 Oct 2024 14:24:47 -0400 Subject: [PATCH] Fix `setFlag` to work in `when` clauses (#43) Closes #42. This adds no additional tests, `setFlag` test are slated forUX tests in #18, and have now been bumped up in priority. --- package.json | 2 +- src/web/state.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f415b0a..1f27c83 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Master Key", "publisher": "haberdashPI", "description": "Master your keybindings with documentation, discoverability, modal bindings, macros and expressive configuration", - "version": "0.3.10", + "version": "0.3.11", "icon": "logo.png", "repository": { "url": "https://github.com/haberdashPi/vscode-master-key" diff --git a/src/web/state.ts b/src/web/state.ts index c725e70..4e0706a 100644 --- a/src/web/state.ts +++ b/src/web/state.ts @@ -300,7 +300,9 @@ const setFlagArgs = z async function setFlag(args_: unknown): Promise { const args = validateInput('master-key.setFlag', args_, setFlagArgs); if (args) { - const opt = !args.transient ? {} : {transient: {reset: false}}; + const opt: ISetOptions = !args.transient + ? {public: true} + : {public: true, transient: {reset: false}}; const a = args; await withState(async state => { return state.set(a.name, opt, a.value);