@@ -469,34 +469,41 @@ impl<T: Item> Picker<T> {
469469
470470 self.matches.sort_unstable();
471471 } else {
472− let query = FuzzyQuery::new(pattern);
473− self.matches.clear();
474− self.matches.extend(
475− self.options
476− .iter()
477− .enumerate()
478− .filter_map(|(index, option)| {
479− let text = option.filter_text(&self.editor_data);
480−
481− query
482− .fuzzy_match(&text, &self.matcher)
483− .map(|score| PickerMatch {
484− index,
485− score,
486− len: text.chars().count(),
487− })
488− }),
489− );
490− self.matches.sort_unstable();
472+ self.force_score();
491473 }
492474
493475 log::debug!("picker score {:?}", Instant::now().duration_since(now));
494476
495477 // reset cursor position
496478 self.cursor = 0;
479+ let pattern = self.prompt.line();
497480 self.previous_pattern.clone_from(pattern);
498481 }
499482
483+ pub fn force_score(&mut self) {
484+ let pattern = self.prompt.line();
485+
486+ let query = FuzzyQuery::new(pattern);
487+ self.matches.clear();
488+ self.matches.extend(
489+ self.options
490+ .iter()
491+ .enumerate()
492+ .filter_map(|(index, option)| {
493+ let text = option.filter_text(&self.editor_data);
494+
495+ query
496+ .fuzzy_match(&text, &self.matcher)
497+ .map(|score| PickerMatch {
498+ index,
499+ score,
500+ len: text.chars().count(),
501+ })
502+ }),
503+ );
504+ self.matches.sort_unstable();
505+ }
506+
500507 /// Move the cursor by a number of lines, either down (`Forward`) or up (`Backward`)
501508 pub fn move_by(&mut self, amount: usize, direction: Direction) {
502509 let len = self.matches.len();