Fix panic when typing umlauts in command palette using Vim mode (#6761)

Release Notes:

- This fixes a panic that occurs when someone was using Vim mode and
typing umlauts into the command palette. E.g: `:%s/impërt`
This commit is contained in:
Thorsten Ball 2024-01-26 11:58:10 +01:00 committed by GitHub
commit 802405f6bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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