From f01720f2010a1dfd11f56565ec89e523310129e5 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 29 Oct 2008 22:08:07 +0000 Subject: * Fix breaking out of scroll regions when the line wraps. --- src/de/mud/terminal/vt320.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/de/mud/terminal/vt320.java b/src/de/mud/terminal/vt320.java index fccd56a..d4aa05a 100644 --- a/src/de/mud/terminal/vt320.java +++ b/src/de/mud/terminal/vt320.java @@ -1530,7 +1530,13 @@ public abstract class vt320 extends VDUBuffer implements VDUInput { } if (C >= columns) { if (wraparound) { - if (R < rows - 1) + int bot = rows; + + // If we're in the scroll region, check against the bottom margin + if (R <= bm && R >= tm) + bot = bm; + + if (R < bot - 1) R++; else insertLine(R, 1, SCROLL_UP); -- cgit v1.2.3