mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-24 05:45:00 +00:00
fix unicode character width
This commit is contained in:
parent
106c6712be
commit
8f031c5fcc
@ -112,8 +112,7 @@ impl<'a> View<'a> {
|
||||
// Find long utf sequences and extract it from mat.x
|
||||
let line = &self.state.lines[mat.y as usize];
|
||||
let prefix = &line[0..mat.x as usize];
|
||||
let extra = prefix.width_cjk() - prefix.chars().count();
|
||||
let offset = (mat.x as u16) - (extra as u16);
|
||||
let offset = prefix.width() as u16;
|
||||
let text = self.make_hint_text(mat.text);
|
||||
|
||||
print!(
|
||||
|
Loading…
Reference in New Issue
Block a user