Skip to content

Commit

Permalink
Fix setFlag to work in when clauses (#43)
Browse files Browse the repository at this point in the history
Closes #42. 

This adds no additional tests, `setFlag` test are slated forUX tests in
#18, and have now been bumped up in priority.
  • Loading branch information
haberdashPI authored Oct 24, 2024
1 parent 7730cb4 commit 924df23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion src/web/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ const setFlagArgs = z
async function setFlag(args_: unknown): Promise<CommandResult> {
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);
Expand Down

0 comments on commit 924df23

Please sign in to comment.