aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-04 00:49:21 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-04 00:49:21 -0500
commitea55c107307ef8bca11accc09ff2c47c74745cb1 (patch)
tree395f68717c932559f0d027d73dd226e0c380c135 /src
parent7958770a507d17e4beed17009206322c6d8fb7c0 (diff)
downloadvt100-rust-ea55c107307ef8bca11accc09ff2c47c74745cb1.tar.gz
vt100-rust-ea55c107307ef8bca11accc09ff2c47c74745cb1.zip
more useful contents/contents_formatted behavior
Diffstat (limited to 'src')
-rw-r--r--src/grid.rs4
-rw-r--r--src/row.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/grid.rs b/src/grid.rs
index cfb04de..20fe17f 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -117,7 +117,7 @@ impl Grid {
for row in self.rows().skip(row_start).take(row_end - row_start + 1) {
contents += &row.contents(col_start, col_end);
}
- contents
+ contents.trim_end().to_string()
}
pub fn contents_formatted(
@@ -137,7 +137,7 @@ impl Grid {
contents += new_contents;
prev_attrs = *new_attrs;
}
- contents
+ contents.trim_end().to_string()
}
pub fn erase_all(&mut self) {
diff --git a/src/row.rs b/src/row.rs
index 8dc5b2e..8fc0531 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -119,7 +119,7 @@ impl Row {
}
}
if !self.wrapped {
- contents += "\n";
+ contents += "\r\n";
}
(contents, prev_attrs)
}