From 9cfd6704c01ba8c8dbd0a7c786902326e6db84bb Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Thu, 15 Aug 2019 19:11:08 -0500 Subject: [PATCH] #48 additional windowops --- src/jexer/tterminal/ECMA48.java | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 93ae3cd9..7286c7db 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; } } } -- 2.27.0