Mercurial > 510Connectbot
diff src/org/tn5250j/framework/tn5250/Screen5250.java @ 307:071eccdff8ea ganymed
fix java formatting
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:16:58 -0700 |
parents | 561caa2f7c17 |
children | 29076621bab0 |
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/Screen5250.java Wed Jul 30 12:09:51 2014 -0700 +++ b/src/org/tn5250j/framework/tn5250/Screen5250.java Wed Jul 30 14:16:58 2014 -0700 @@ -1327,6 +1327,7 @@ break; case HOME: + // position to the home position set if (lastPos + numCols + 1 != homePos) { goto_XY(homePos - numCols - 1); @@ -2661,7 +2662,9 @@ if (l >= 0) { lastPos = l * numCols + c; + while (!isInField()) advancePos(); + setDirty(lastPos); fireCursorChanged(); } @@ -2673,12 +2676,14 @@ setDirty(lastPos); setDirty(lastPos + cf.getLength()); lastPos += data.length; + if (!isInField()) { gotoFieldNext(); isInField(); cf = screenFields.getCurrentField(); lastPos = cf.getStartPos(); } + setDirty(lastPos); fireCursorChanged(); } @@ -3568,7 +3573,9 @@ */ protected void changePos(int i) { lastPos += i; + while (lastPos < 0) lastPos += lenScreen; + while (lastPos >= lenScreen) lastPos -= lenScreen; } @@ -3745,7 +3752,7 @@ } public void onFontSizeChanged(float size) { - fireScreenChanged(0, 0, numRows-1, numCols-1); + fireScreenChanged(0, 0, numRows - 1, numCols - 1); } /**