aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2008-10-29 22:08:07 +0000
committerKenny Root <kenny@the-b.org>2008-10-29 22:08:07 +0000
commitf01720f2010a1dfd11f56565ec89e523310129e5 (patch)
tree4e700be5b38d1c9edbb032ca743ea4838f8484cd /src
parent90dc1ecd26baafe84633e5cf7afd1ff6c9a3d1e0 (diff)
downloadconnectbot-f01720f2010a1dfd11f56565ec89e523310129e5.tar.gz
connectbot-f01720f2010a1dfd11f56565ec89e523310129e5.tar.bz2
connectbot-f01720f2010a1dfd11f56565ec89e523310129e5.zip
* Fix breaking out of scroll regions when the line wraps.
Diffstat (limited to 'src')
-rw-r--r--src/de/mud/terminal/vt320.java8
1 files changed, 7 insertions, 1 deletions
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);