Filter and sort suggestions in autocomplete

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-02-01 15:11:20 +01:00
co-authored by Nathan Sobo
parent bcbd265de9
commit b89a39bcb3
11 changed files with 258 additions and 171 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ impl FindBar {
let mut text: String;
if selection.start == selection.end {
let point = selection.start.to_display_point(&display_map);
let (range, _) = editor::movement::surrounding_word(&display_map, point);
let range = editor::movement::surrounding_word(&display_map, point);
let range = range.start.to_offset(&display_map, Bias::Left)
..range.end.to_offset(&display_map, Bias::Right);
text = display_map.buffer_snapshot.text_for_range(range).collect();