aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/grid.rs2
-rw-r--r--tests/scroll.rs4
3 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b428575..e16e88d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
`contents_diff`.
* Fixed RI when the cursor is at the top of the screen (fixes scrolling up in
`less`, for instance).
+* Fixed VPA incorrectly being clamped to the scroll region.
## [0.3.1] - 2019-11-06
diff --git a/src/grid.rs b/src/grid.rs
index 3c262fe..0d075ea 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -351,8 +351,6 @@ impl Grid {
pub fn row_set(&mut self, i: u16) {
self.pos.row = i;
- self.row_clamp_top(true);
- self.row_clamp_bottom(true);
}
pub fn col_inc(&mut self, count: u16) {
diff --git a/tests/scroll.rs b/tests/scroll.rs
index b7f3df9..1aa9377 100644
--- a/tests/scroll.rs
+++ b/tests/scroll.rs
@@ -29,6 +29,10 @@ fn scroll_regions() {
assert_eq!(parser.screen().contents(), "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n\n15\n16\n17\n18\n21\n22\n23\n24");
parser.process(b"\x1b[10;50H\x1bM");
assert_eq!(parser.screen().contents(), "1\n2\n3\n4\n5\n6\n7\n8\n9\n\n10\n11\n12\n13\n14\n\n\n15\n16\n17\n21\n22\n23\n24");
+
+ assert_eq!(parser.screen().cursor_position(), (9, 49));
+ parser.process(b"\x1b[23d");
+ assert_eq!(parser.screen().cursor_position(), (22, 49));
}
#[test]