X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Ftterminal%2FECMA48.java;h=12e7a2bc3638b22d2aa19651661a2e899d167afb;hb=20c416a0cb63ad5d2e3f14eae42d2d7b2f13e946;hp=8a88799026c054f064c29d2676fa2f50b8168781;hpb=0b208311a365e340dda7f6a3c4899b2b955517e7;p=fanfix.git diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 8a88799..12e7a2b 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -3199,10 +3199,10 @@ public class ECMA48 implements Runnable { if (decPrivateModeFlag == true) { if (value == true) { // Enable sixel scrolling (default). - // TODO + // Not supported } else { // Disable sixel scrolling. - // TODO + // Not supported } } } @@ -4037,7 +4037,7 @@ public class ECMA48 implements Runnable { case 8: // Invisible - // TODO + // Not supported break; case 90: @@ -4778,13 +4778,22 @@ public class ECMA48 implements Runnable { private void oscPut(final char xtermChar) { // System.err.println("oscPut: " + xtermChar); + boolean oscEnd = false; + + if (xtermChar == 0x07) { + oscEnd = true; + } + if ((xtermChar == '\\') + && (collectBuffer.charAt(collectBuffer.length() - 1) == '\033') + ) { + oscEnd = true; + } + // Collect first collectBuffer.append(xtermChar); // Xterm cases... - if ((xtermChar == 0x07) - || (collectBuffer.toString().endsWith("\033\\")) - ) { + if (oscEnd) { String args = null; if (xtermChar == 0x07) { args = collectBuffer.substring(0, collectBuffer.length() - 1); @@ -4867,11 +4876,19 @@ public class ECMA48 implements Runnable { private void pmPut(final char pmChar) { // System.err.println("pmPut: " + pmChar); + boolean pmEnd = false; + + if ((pmChar == '\\') + && (collectBuffer.charAt(collectBuffer.length() - 1) == '\033') + ) { + pmEnd = true; + } + // Collect first collectBuffer.append(pmChar); // Xterm cases... - if (collectBuffer.toString().endsWith("\033\\")) { + if (pmEnd) { String arg = null; arg = collectBuffer.substring(0, collectBuffer.length() - 2); @@ -7306,9 +7323,10 @@ public class ECMA48 implements Runnable { for (int x = 0; x < cellColumns; x++) { 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. + // A real sixel terminal would render the text of the current + // cell first, then image over it (accounting for blank + // pixels). We do not support that. A cell is either text, + // or image, but not a mix of image-over-text. DisplayLine line = display.get(currentState.cursorY); line.replace(currentState.cursorX, cells[x][y]);