diff options
| author | 依云 <lilydjwg@gmail.com> | 2025-11-18 11:26:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 19:26:33 -0800 |
| commit | 6e13e974b047ee464ecfe6d9c23a9cc27715f7e1 (patch) | |
| tree | 9477d673bea9adde32aa1e36995f7415dcb2aeb0 /crates | |
| parent | chore: fix typo (#2994) (diff) | |
| download | atuin-6e13e974b047ee464ecfe6d9c23a9cc27715f7e1.zip | |
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
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/atuin/src/command/client/search/history_list.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/atuin/src/command/client/search/history_list.rs b/crates/atuin/src/command/client/search/history_list.rs index 899308db..47a7d9dc 100644 --- a/crates/atuin/src/command/client/search/history_list.rs +++ b/crates/atuin/src/command/client/search/history_list.rs @@ -273,8 +273,9 @@ impl DrawState<'_> { } style.attributes.set(style::Attribute::Bold); } - self.draw(&ch.to_string(), style.into()); - pos += 1; + let s = ch.to_string(); + self.draw(&s, style.into()); + pos += s.len(); } pos += 1; } |
