Report the candidate's index when matching strings
This commit is contained in:
parent
5f2ac61401
commit
5e64f1aca8
2 changed files with 17 additions and 8 deletions
|
@ -167,7 +167,9 @@ impl ThemeSelector {
|
|||
self.matches = if query.is_empty() {
|
||||
candidates
|
||||
.into_iter()
|
||||
.map(|candidate| StringMatch {
|
||||
.enumerate()
|
||||
.map(|(index, candidate)| StringMatch {
|
||||
candidate_index: index,
|
||||
string: candidate.string,
|
||||
positions: Vec::new(),
|
||||
score: 0.0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue