mirror of
https://github.com/helix-editor/spellbook.git
synced 2025-10-06 00:02:48 +02:00
suggester: Avoid panic rotating titlecased suggestion to front
This commit is contained in:
@@ -135,7 +135,9 @@ impl<'a, S: BuildHasher> Suggester<'a, S> {
|
||||
.upper_char_at(suggestion, after_space_idx);
|
||||
out[i] = titled;
|
||||
// Rotate this suggestion to the front. (I think? TODO)
|
||||
out[..i].rotate_right(1);
|
||||
if i > 0 {
|
||||
out[..i].rotate_right(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Casing::All => {
|
||||
|
Reference in New Issue
Block a user