X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Ftterminal%2FECMA48.java;h=7286c7db9afd77aee39c1e4070d0c0999981f536;hb=4614b3bf2220b2ddc27ae87aeb5ec893451d4e60;hp=9ff37a181fdfc0871e086d47782a1c94f7852904;hpb=afdec5e9d0416e1c571f1961572b8ededef81146;p=fanfix.git diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 9ff37a1..7286c7d 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -4721,10 +4721,26 @@ public class ECMA48 implements Runnable { int i = getCsiParam(0, 0); if (!xtermPrivateModeFlag) { - if (i == 14) { - // Report xterm window in pixels as CSI 4 ; height ; width t + switch (i) { + case 14: + // Report xterm text area size in pixels as CSI 4 ; height ; + // width t writeRemote(String.format("\033[4;%d;%dt", textHeight * height, textWidth * width)); + break; + case 16: + // Report character size in pixels as CSI 6 ; height ; width + // t + writeRemote(String.format("\033[6;%d;%dt", textHeight, + textWidth)); + break; + case 18: + // Report the text are size in characters as CSI 8 ; height ; + // width t + writeRemote(String.format("\033[8;%d;%dt", height, width)); + break; + default: + break; } } } @@ -6656,19 +6672,19 @@ public class ECMA48 implements Runnable { // 00-17, 19, 1C-1F, 20-7E --> put if (ch <= 0x17) { - sixelParseBuffer.append(ch); + sixelParseBuffer.append((char) ch); return; } if (ch == 0x19) { - sixelParseBuffer.append(ch); + sixelParseBuffer.append((char) ch); return; } if ((ch >= 0x1C) && (ch <= 0x1F)) { - sixelParseBuffer.append(ch); + sixelParseBuffer.append((char) ch); return; } if ((ch >= 0x20) && (ch <= 0x7E)) { - sixelParseBuffer.append(ch); + sixelParseBuffer.append((char) ch); return; }