aboutsummaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
author依云 <lilydjwg@gmail.com>2025-11-18 11:26:33 +0800
committerGitHub <noreply@github.com>2025-11-17 19:26:33 -0800
commit6e13e974b047ee464ecfe6d9c23a9cc27715f7e1 (patch)
tree9477d673bea9adde32aa1e36995f7415dcb2aeb0 /crates
parentchore: fix typo (#2994) (diff)
downloadatuin-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.rs5
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;
}