From 287a7c95475417cd3bc4a7a5ed7b4b27905af6b9 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 12 Feb 2010 05:17:38 +0000 Subject: Check for scroll regions when inserting wide characters git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@477 df292f66-193f-0410-a5fc-6d59da041ff2 --- src/de/mud/terminal/vt320.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3