aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-tui/src/buffer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-tui/src/buffer.rs b/helix-tui/src/buffer.rs
index 806a178b..2d93005b 100644
--- a/helix-tui/src/buffer.rs
+++ b/helix-tui/src/buffer.rs
@@ -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)