aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
diff options
context:
space:
mode:
authorIvan Tham2021-06-26 01:45:49 +0000
committerNathan Vegdahl2021-06-26 15:52:22 +0000
commited1a745442a88804fd193a8a5d946377516cf39d (patch)
tree40ca430e9fc58cbadacbab25f77ab964a112c84b /helix-tui/src
parenta6cadddef4b43659ad3faedac455f32f6019025d (diff)
Trait width method use refactor
Diffstat (limited to 'helix-tui/src')
-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 2d93005b..3a7ad144 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) < UnicodeWidthStr::width(string.as_ref()) {
+ if ellipsis && x_offset - (x as usize) < string.as_ref().width() {
self.content[index].set_symbol("…");
}
(x_offset as u16, y)