aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-03 14:35:07 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-03 14:35:07 -0500
commit1d33fb3644b3483f7840e2eb9051a0c697326d63 (patch)
tree32646c98e9f79ca85b2580eda219ac2b14fcf95f /src
parent1c5f52ec5956f8dc95dcd0b7b24c00c031594efd (diff)
downloadvt100-rust-1d33fb3644b3483f7840e2eb9051a0c697326d63.tar.gz
vt100-rust-1d33fb3644b3483f7840e2eb9051a0c697326d63.zip
fix off-by-one in erase_row_backward
fixes behavior of CSI 1 J and CSI 1 K (which are not particularly commonly used, which is why this was missed before)
Diffstat (limited to 'src')
-rw-r--r--src/grid.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grid.rs b/src/grid.rs
index 7e7b9ed..e6098a9 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -174,7 +174,7 @@ impl Grid {
pub fn erase_row_backward(&mut self) {
let pos = self.pos;
let row = self.current_row_mut();
- for cell in row.cells_mut().take(pos.col as usize) {
+ for cell in row.cells_mut().take(pos.col as usize + 1) {
*cell = crate::cell::Cell::default();
}
}