This commit is contained in:
Francis Chua 2023-11-12 00:49:15 +00:00
parent 512a463758
commit e5d05afafb
2 changed files with 3 additions and 2 deletions

View file

@ -20,7 +20,8 @@ impl Input {
let snap = self.snap();
let idx = snap.idx(snap.cursor).unwrap_or(snap.len());
let step = Self::find_word_boundary(snap.value[idx..].chars(), opt.end_of_word, opt.end_of_word);
let step =
Self::find_word_boundary(snap.value[idx..].chars(), opt.end_of_word, opt.end_of_word);
self.move_(step as isize)
}
}

View file

@ -79,7 +79,7 @@ impl Input {
let Some(prev) = prev else {
return 0;
};
// Move until we see a different character class or the end of the iterator.
input.take_while(|c| CharKind::new(*c) == CharKind::new(prev)).count()
}