diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-03 01:54:03 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-03 01:54:03 -0500 |
commit | 003a4d085fd4b99ac96f2bad8219b585732f18eb (patch) | |
tree | 5350a723b52a250f39696c595439001ae9c420da /src | |
parent | c200815e1583045e8f3bab6cbf3a816f1a5f76da (diff) | |
download | vt100-rust-003a4d085fd4b99ac96f2bad8219b585732f18eb.tar.gz vt100-rust-003a4d085fd4b99ac96f2bad8219b585732f18eb.zip |
another wide char/line wrapping edge case
Diffstat (limited to 'src')
-rw-r--r-- | src/screen.rs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/screen.rs b/src/screen.rs index 0c08881..177a28e 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -924,13 +924,19 @@ impl Screen { if width > 1 { let pos = self.grid().pos(); if self.current_cell().is_wide() { - let next_next_cell = self - .drawing_cell_mut(crate::grid::Pos { - row: pos.row, - col: pos.col + 1, - }) - .unwrap(); + let next_next_pos = crate::grid::Pos { + row: pos.row, + col: pos.col + 1, + }; + let next_next_cell = + self.drawing_cell_mut(next_next_pos).unwrap(); next_next_cell.clear(attrs); + if next_next_pos.col == size.cols - 1 { + self.grid_mut() + .drawing_row_mut(next_next_pos) + .unwrap() + .wrap(false); + } } let next_cell = self.current_cell_mut(); next_cell.clear(attrs); |