aboutsummaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-12-06 22:15:49 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-06 23:28:04 -0500
commite13049c91c036354b311bc529b0b258aa4b61952 (patch)
treebf8b21cbffe4545c0e58ba1827d249c662675ee8 /src/row.rs
parente156958580d91b3244e4806ef1a6aa18e900a823 (diff)
downloadvt100-rust-e13049c91c036354b311bc529b0b258aa4b61952.tar.gz
vt100-rust-e13049c91c036354b311bc529b0b258aa4b61952.zip
fix contents when a wrapped row is followed by an empty row
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/row.rs b/src/row.rs
index a0d44a4..b8da987 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -85,6 +85,7 @@ impl Row {
contents: &mut String,
start: u16,
width: u16,
+ wrapping: bool,
) {
let mut prev_was_wide = false;
@@ -112,6 +113,9 @@ impl Row {
prev_col += if cell.is_wide() { 2 } else { 1 };
}
}
+ if prev_col == start && wrapping {
+ contents.push('\n');
+ }
}
pub fn write_contents_formatted(