Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix panic when typing umlauts in command palette using Vim mode

Thorsten Ball8d2a401f0940
diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rs
index 1886ddd0abd..d12cf6152fb 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<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() {