Fix panic when typing umlauts in command palette using Vim mode

Co-Authored-By: Antonio <antonio@zed.dev>
This commit is contained in:
Thorsten Ball 2024-01-26 10:57:14 +01:00
parent f7a2118b15
commit 8d2a401f09

View file

@ -282,7 +282,7 @@ fn generate_positions(string: &str, query: &str) -> Vec<usize> {
return positions;
};
for (i, c) in string.chars().enumerate() {
for (i, c) in string.char_indices() {
if c == current {
positions.push(i);
if let Some(c) = chars.next() {