Skip to content

Commit

Permalink
Store when before pushing new key to queue
Browse files Browse the repository at this point in the history
Once key is in the queue, it will usually execute immediately. Therefore, the `when` condition couldn't be evaluated.

This fixes VSpaceCode/VSpaceCode#256
  • Loading branch information
stevenguh committed Dec 1, 2021
1 parent a065094 commit b0bd352
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix an issue where `when` in conditional bindings couldn't be evaluated since v0.10.0. ([VSpaceCode/#256](https://github.com/VSpaceCode/VSpaceCode/issues/256))

## [0.11.0] - 2021-11-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/menu/baseWhichKeyMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export abstract class BaseWhichKeyMenu<T extends BaseWhichKeyMenuItem> implement
// ],
// }
// ```
this._valueQueue.push(arg.key);
this._when = arg.when;
this._valueQueue.push(arg.key);
}

private handleDidAccept(): void {
Expand Down

0 comments on commit b0bd352

Please sign in to comment.