diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-03 14:29:35 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-03 14:29:35 -0500 |
commit | 9c4c843baca54ff256bfdbdac231b4b6399b8550 (patch) | |
tree | 9222fa0de06398eceba053ca105569f724e5e621 | |
parent | 91e0dcd8f9de84a9cd0a45b1e776f59ea527881e (diff) | |
download | vt100-rust-9c4c843baca54ff256bfdbdac231b4b6399b8550.tar.gz vt100-rust-9c4c843baca54ff256bfdbdac231b4b6399b8550.zip |
scrolling down should clear the last row's wrap flag
-rw-r--r-- | src/grid.rs | 2 | ||||
-rw-r--r-- | tests/data/fixtures/il_dl.in | 1 | ||||
-rw-r--r-- | tests/data/fixtures/il_dl/22.json | 12 | ||||
-rw-r--r-- | tests/data/fixtures/il_dl/22.typescript | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs index d568205..839ac2f 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -481,6 +481,7 @@ impl Grid { for _ in 0..count { self.rows.remove(self.scroll_bottom as usize); self.rows.insert(self.pos.row as usize, self.new_row()); + self.rows[self.scroll_bottom as usize].wrap(false); } } @@ -514,6 +515,7 @@ impl Grid { for _ in 0..count { self.rows.remove(self.scroll_bottom as usize); self.rows.insert(self.scroll_top as usize, self.new_row()); + self.rows[self.scroll_bottom as usize].wrap(false); } } diff --git a/tests/data/fixtures/il_dl.in b/tests/data/fixtures/il_dl.in index 86d41f8..b2519a6 100644 --- a/tests/data/fixtures/il_dl.in +++ b/tests/data/fixtures/il_dl.in @@ -19,3 +19,4 @@ cd \x1bc\x1b[1;80Haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\x1b[H \x1b[L \x1bc\x1b[1;80H\x1b[1mab\x1b[M +\x1bc\x1b[23;80Hab\x1b[23H\x1b[L diff --git a/tests/data/fixtures/il_dl/22.json b/tests/data/fixtures/il_dl/22.json new file mode 100644 index 0000000..d4b36d5 --- /dev/null +++ b/tests/data/fixtures/il_dl/22.json @@ -0,0 +1,12 @@ +{ + "contents": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n a", + "cells": { + "23,79": { + "contents": "a" + } + }, + "cursor_position": [ + 22, + 0 + ] +}
\ No newline at end of file diff --git a/tests/data/fixtures/il_dl/22.typescript b/tests/data/fixtures/il_dl/22.typescript new file mode 100644 index 0000000..791ffec --- /dev/null +++ b/tests/data/fixtures/il_dl/22.typescript @@ -0,0 +1 @@ +c[23;80Hab[23H[L
\ No newline at end of file |