on master help sign in
Trait width method use refactor
commited1a745442a88804fd193a8a5d946377516cf39d authorIvan Tham <pickfire@riseup.net> dateSat 26 Jun 2021, 09:45 (5 years ago) parenta6caddd
1 file changed+1−1
helix-tui/src/buffer.rs+1−1
helix-tui/src/buffer.rs+1−1
@@ -309,7 +309,7 @@ impl Buffer {
309309 index += width;
310310 x_offset += width;
311311 }
312− if ellipsis && x_offset - (x as usize) < UnicodeWidthStr::width(string.as_ref()) {
312+ if ellipsis && x_offset - (x as usize) < string.as_ref().width() {
313313 self.content[index].set_symbol("…");
314314 }
315315 (x_offset as u16, y)