aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.rs')
-rw-r--r--src/screen.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen.rs b/src/screen.rs
index 7224f6a..7abd72c 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -1,4 +1,5 @@
use std::convert::TryInto as _;
+use unicode_width::UnicodeWidthChar as _;
const DEFAULT_MULTI_PARAMS: &[i64] = &[0];
@@ -470,7 +471,7 @@ impl Screen {
}
}
- let width = crate::unicode::char_width(c);
+ let width = c.width().unwrap_or(0).try_into().unwrap();
let attrs = self.attrs;
self.grid_mut().col_wrap(width);