X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FECMA48Terminal.java;h=9884835591adba9cfa57530cca3759ee8fb6404e;hb=739ada621a9220c1764172118efe68d3e26db18a;hp=3fc6c2092cb38c5aaa2b17b3a61f1e3461a68e29;hpb=842be156c1c15b74c1b4bfe30c2866773494a2af;p=fanfix.git diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index 3fc6c20..9884835 100644 --- a/src/jexer/backend/ECMA48Terminal.java +++ b/src/jexer/backend/ECMA48Terminal.java @@ -2760,6 +2760,27 @@ public class ECMA48Terminal extends LogicalScreen heightPixels = 400; } } + if ((params.size() > 2) && (params.get(0).equals("6"))) { + if (debugToStderr) { + System.err.printf("windowOp text cell pixels: " + + "height %s width %s\n", + params.get(1), params.get(2)); + } + try { + widthPixels = width * Integer.parseInt(params.get(2)); + heightPixels = height * Integer.parseInt(params.get(1)); + } catch (NumberFormatException e) { + if (debugToStderr) { + e.printStackTrace(); + } + } + if (widthPixels <= 0) { + widthPixels = 640; + } + if (heightPixels <= 0) { + heightPixels = 400; + } + } resetParser(); return; default: @@ -2794,7 +2815,9 @@ public class ECMA48Terminal extends LogicalScreen * @return the string to emit to xterm */ private String xtermReportWindowPixelDimensions() { - return "\033[14t"; + // We will ask for both window and text cell dimensions, and + // hopefully one of them will work. + return "\033[14t\033[16t"; } /**