aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2010-02-12 05:17:38 +0000
committerKenny Root <kenny@the-b.org>2010-02-12 05:17:38 +0000
commit287a7c95475417cd3bc4a7a5ed7b4b27905af6b9 (patch)
treef42d075cdcecd5ac515a4d263461900c95cd2be9 /src
parent8dfdc0e8deef20757ccb2b7fe623d1116a8a3bd0 (diff)
downloadconnectbot-287a7c95475417cd3bc4a7a5ed7b4b27905af6b9.tar.gz
connectbot-287a7c95475417cd3bc4a7a5ed7b4b27905af6b9.tar.bz2
connectbot-287a7c95475417cd3bc4a7a5ed7b4b27905af6b9.zip
Check for scroll regions when inserting wide characters
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@477 df292f66-193f-0410-a5fc-6d59da041ff2
Diffstat (limited to 'src')
-rw-r--r--src/de/mud/terminal/vt320.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/de/mud/terminal/vt320.java b/src/de/mud/terminal/vt320.java
index 1ebc98c..a09deff 100644
--- a/src/de/mud/terminal/vt320.java
+++ b/src/de/mud/terminal/vt320.java
@@ -1778,7 +1778,10 @@ public void setScreenSize(int c, int r, boolean broadcast) {
if (isWide) {
if (C >= columns - 1) {
C = 0;
- R++;
+ if (R == getBottomMargin() || R == rows - 1)
+ insertLine(R, 1, SCROLL_UP);
+ else
+ R++;
}
insertChar(C++, R, c, attributes | FULLWIDTH);
insertChar(C, R, ' ', attributes | FULLWIDTH);
@@ -1788,7 +1791,10 @@ public void setScreenSize(int c, int r, boolean broadcast) {
if (isWide) {
if (C >= columns - 1) {
C = 0;
- R++;
+ if (R == getBottomMargin() || R == rows - 1)
+ insertLine(R, 1, SCROLL_UP);
+ else
+ R++;
}
putChar(C++, R, c, attributes | FULLWIDTH);
putChar(C, R, ' ', attributes | FULLWIDTH);