From 8d2a401f0940e416bac0e0f0ba07365537026b99 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Fri, 26 Jan 2024 10:57:14 +0100 Subject: [PATCH] Fix panic when typing umlauts in command palette using Vim mode Co-Authored-By: Antonio --- crates/vim/src/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rs index 1886ddd0ab..d12cf6152f 100644 --- a/crates/vim/src/command.rs +++ b/crates/vim/src/command.rs @@ -282,7 +282,7 @@ fn generate_positions(string: &str, query: &str) -> Vec { 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() {