case XTERM:
// "I am a VT220" - 7 bit version
if (!s8c1t) {
- return "\033[?62;1;6;9;4c";
+ return "\033[?62;1;6;9;4;22c";
}
// "I am a VT220" - 8 bit version
- return "\u009b?62;1;6;9;4c";
+ return "\u009b?62;1;6;9;4;22c";
default:
throw new IllegalArgumentException("Invalid device type: " + type);
}
// Local echo for everything else
printCharacter(keypress.getChar());
}
+ if (displayListener != null) {
+ displayListener.displayChanged();
+ }
}
if ((newLineMode == true) && (keypress.equals(kbEnter))) {
}
// 00-17, 19, 1C-1F, 20-7E --> put
- // TODO
if (ch <= 0x17) {
+ // We ignore all DCS except sixel.
return;
}
if (ch == 0x19) {
+ // We ignore all DCS except sixel.
return;
}
if ((ch >= 0x1C) && (ch <= 0x1F)) {
+ // We ignore all DCS except sixel.
return;
}
if ((ch >= 0x20) && (ch <= 0x7E)) {
+ // We ignore all DCS except sixel.
return;
}
int x0 = currentState.cursorX;
for (int y = 0; y < cellRows; y++) {
for (int x = 0; x < cellColumns; x++) {
- printCharacter(' ');
- cursorLeft(1, false);
- if ((x == cellColumns - 1) || (y == cellRows - 1)) {
- // TODO: render text of current cell first, then image
- // over it. For now, just copy the cell.
- DisplayLine line = display.get(currentState.cursorY);
- line.replace(currentState.cursorX, cells[x][y]);
- } else {
- // Copy the image cell into the display.
- DisplayLine line = display.get(currentState.cursorY);
- line.replace(currentState.cursorX, cells[x][y]);
+ assert (currentState.cursorX <= rightMargin);
+
+ // TODO: Render text of current cell first, then image over
+ // it (accounting for blank pixels). For now, just copy the
+ // cell.
+ DisplayLine line = display.get(currentState.cursorY);
+ line.replace(currentState.cursorX, cells[x][y]);
+
+ // If at the end of the visible screen, stop.
+ if (currentState.cursorX == rightMargin) {
+ break;
}
- cursorRight(1, false);
+ // Room for more image on the visible screen.
+ currentState.cursorX++;
}
linefeed();
cursorPosition(currentState.cursorY, x0);