From ed1a745442a88804fd193a8a5d946377516cf39d Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sat, 26 Jun 2021 09:45:49 +0800 Subject: [PATCH] Trait width method use refactor --- helix-tui/src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-tui/src/buffer.rs b/helix-tui/src/buffer.rs index 2d93005b6..3a7ad144f 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)