mirror of
https://github.com/helix-editor/helix
synced 2024-11-10 10:34:45 +01:00
Use unicode_width to correctly truncate picker chars
This commit is contained in:
parent
c688288881
commit
e8d2f3612f
@ -309,7 +309,7 @@ impl Buffer {
|
||||
index += width;
|
||||
x_offset += width;
|
||||
}
|
||||
if ellipsis && x_offset - (x as usize) < string.as_ref().chars().count() {
|
||||
if ellipsis && x_offset - (x as usize) < UnicodeWidthStr::width(string.as_ref()) {
|
||||
self.content[index].set_symbol("…");
|
||||
}
|
||||
(x_offset as u16, y)
|
||||
|
Loading…
Reference in New Issue
Block a user