- fixed 'I' command in normal mode not moving to exact start of line

This commit is contained in:
2026-02-23 14:42:53 -05:00
parent d817aed056
commit 723bfd8413
2 changed files with 51 additions and 2 deletions

View File

@@ -2055,9 +2055,10 @@ impl LineBuf {
}
MotionCmd(_, Motion::BeginningOfFirstWord) => {
let start = self.start_of_line();
let mut indices = self.directional_indices_iter_from(start, Direction::Forward);
self.update_graphemes_lazy();
let indices = self.grapheme_indices().to_vec();
let mut first_graphical = None;
while let Some(idx) = indices.next() {
for &idx in indices.iter().skip(start) {
let grapheme = self.grapheme_at(idx).unwrap();
if !is_whitespace(grapheme) {
first_graphical = Some(idx);