diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-06 04:32:24 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-06 04:32:24 -0500 |
commit | e523a38bd2665a1a487382c5042d94770e4087af (patch) | |
tree | 62c39d7cd350c57d9684c135b528df5a1b87772e /src/cell.rs | |
parent | d94ec144dd1ca29886ebbc438882e73af6fe0ae9 (diff) | |
download | vt100-rust-e523a38bd2665a1a487382c5042d94770e4087af.tar.gz vt100-rust-e523a38bd2665a1a487382c5042d94770e4087af.zip |
better (i think?) handling of weird character widths
control codes are ignored completely, and everything else defaults to 1
instead of 0
Diffstat (limited to 'src/cell.rs')
-rw-r--r-- | src/cell.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cell.rs b/src/cell.rs index 7262c8d..857c9e2 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -36,7 +36,7 @@ impl Cell { // strings in this context should always be an arbitrary character // followed by zero or more zero-width characters, so we should only // have to look at the first character - self.set_wide(c.width().unwrap_or(0) > 1); + self.set_wide(c.width().unwrap_or(1) > 1); self.attrs = a; } |