Update command matches faster

This commit is contained in:
Conrad Irwin 2023-11-13 15:58:04 -07:00
parent ca3341f066
commit abdaa3105b
2 changed files with 7 additions and 14 deletions

View file

@ -130,16 +130,7 @@ impl CommandPaletteDelegate {
) -> Self {
Self {
command_palette,
matches: commands
.iter()
.enumerate()
.map(|(i, command)| StringMatch {
candidate_id: i,
string: command.name.clone(),
positions: Vec::new(),
score: 0.0,
})
.collect(),
matches: vec![],
commands,
selected_ix: 0,
previous_focus_handle,