Make command keys searchable as well as the label/name of the commands

This commit is contained in:
Jonatan Heyman 2025-04-23 15:25:16 +02:00
parent 03cdb0103b
commit fc1985cb1a
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Here are the most notable changes in each release. For a more detailed list of c
### Bug Fixes ### Bug Fixes
- Fix issue where the second command in the command palette, instead of the first command, was selected when the palette is opened. - Fix issue where the second command in the command palette, instead of the first command, was selected when the palette is opened.
- Change name/label of some commands in the command palette, and make commands searchable using their key names as well.
## 2.2.0 ## 2.2.0

View File

@ -102,7 +102,7 @@
return this.commands return this.commands
} }
const searchResults = fuzzysort.go(this.filter.slice(1), this.commands, { const searchResults = fuzzysort.go(this.filter.slice(1), this.commands, {
keys: ["name"], keys: ["name", "cmd"],
}) })
return searchResults.map((result) => { return searchResults.map((result) => {
const obj = {...result.obj} const obj = {...result.obj}