Fix panic when typing umlauts in command palette using Vim mode

Thorsten Ball and Antonio created

Co-Authored-By: Antonio <antonio@zed.dev>

Change summary

crates/vim/src/command.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/vim/src/command.rs 🔗

@@ -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() {