X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=c9b025abb257cb260f1ecff0f62a97e792d4caef;hb=24489803a611e99348e26cadedae1141f48c1a6c;hp=4e7971eaf71fce92b4fa61e32e6d3288ef05aaa4;hpb=00fbfc382425d1f20a84cd8897919836cc6254ee;p=fanfix.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index 4e7971e..c9b025a 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -293,6 +293,16 @@ public class LogicalScreen implements Screen { if ((X >= 0) && (X < width) && (Y >= 0) && (Y < height)) { logical[X][Y].setTo(attr); + + // If this happens to be the cursor position, make the position + // dirty. + if ((cursorX == X) && (cursorY == Y)) { + if (physical[cursorX][cursorY].getChar() == 'Q') { + physical[cursorX][cursorY].setChar('X'); + } else { + physical[cursorX][cursorY].setChar('Q'); + } + } } } @@ -354,6 +364,16 @@ public class LogicalScreen implements Screen { logical[X][Y].setTo(attr); logical[X][Y].setChar(ch); + + // If this happens to be the cursor position, make the position + // dirty. + if ((cursorX == X) && (cursorY == Y)) { + if (physical[cursorX][cursorY].getChar() == 'Q') { + physical[cursorX][cursorY].setChar('X'); + } else { + physical[cursorX][cursorY].setChar('Q'); + } + } } } @@ -381,6 +401,16 @@ public class LogicalScreen implements Screen { if ((X >= 0) && (X < width) && (Y >= 0) && (Y < height)) { logical[X][Y].setChar(ch); + + // If this happens to be the cursor position, make the position + // dirty. + if ((cursorX == X) && (cursorY == Y)) { + if (physical[cursorX][cursorY].getChar() == 'Q') { + physical[cursorX][cursorY].setChar('X'); + } else { + physical[cursorX][cursorY].setChar('Q'); + } + } } }