Implemented terminal status and cursor position reports

master
Marco Maccaferri 2020-05-18 11:49:01 +02:00
rodzic f6cd577b61
commit 13c92c5cbf
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -587,6 +587,20 @@ public class Terminal {
font.setBackground(paletteData.colors[background]);
break;
}
case 'n':
if (args[0] == 5) {
writeByte((byte) 0x1B);
writeByte((byte) '[');
writeByte((byte) '0');
writeByte((byte) 'n');
}
else if (args[0] == 6) {
byte[] b = String.format("%c[%d;%dR", 0x1B, cy, cx).getBytes();
for (int i = 0; i < b.length; i++) {
writeByte(b[i]);
}
}
break;
case 's':
savedCx = cx;
savedCy = cy;