file_finder: Fix open path prompt creating wrong highlight indices (#40488)

Fixes ZED-28R

Release Notes:

- Fixed open path prompt panicking on certain inputs
This commit is contained in:
Lukas Wirth
2025-10-17 12:41:09 +00:00
committed by GitHub
parent b59a3bbd49
commit b7112320bb
3 changed files with 39 additions and 33 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ impl PickerDelegate for PickerPromptDelegate {
let highlights: Vec<_> = hit
.positions
.iter()
.filter(|index| index < &&self.max_match_length)
.filter(|&&index| index < self.max_match_length)
.copied()
.collect();