Skip to content

Commit 6e13e97

Browse files
authored
fix: highlight the correct place when multibyte characters are involved (#2965)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if you're adding a new feature or changing an existing one, we'd really appreciate if you open an issue, post on the forum, or drop in on Discord --> ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing
1 parent 74826fc commit 6e13e97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/atuin/src/command/client/search/history_list.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ impl DrawState<'_> {
273273
}
274274
style.attributes.set(style::Attribute::Bold);
275275
}
276-
self.draw(&ch.to_string(), style.into());
277-
pos += 1;
276+
let s = ch.to_string();
277+
self.draw(&s, style.into());
278+
pos += s.len();
278279
}
279280
pos += 1;
280281
}

0 commit comments

Comments
 (0)