X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FECMA48Terminal.java;h=ca1d499594734c75275a53f90a7f5fb8aa9f9a56;hb=9f613a0c54cb97e9305fd87ce8eb2f76ac82804e;hp=252e80c4123a85d94af54a15e734ac8ade3c12ea;hpb=0c28ec38449a59cf34cf5b3c13ea02add1ee57c5;p=fanfix.git diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index 252e80c..ca1d499 100644 --- a/src/jexer/backend/ECMA48Terminal.java +++ b/src/jexer/backend/ECMA48Terminal.java @@ -1002,7 +1002,8 @@ public class ECMA48Terminal extends LogicalScreen // ------------------------------------------------------------------------ /** - * Constructor sets up state for getEvent(). + * Constructor sets up state for getEvent(). If either windowWidth or + * windowHeight are less than 1, the terminal is not resized. * * @param listener the object this backend needs to wake up when new * input comes in @@ -1026,10 +1027,12 @@ public class ECMA48Terminal extends LogicalScreen // Send dtterm/xterm sequences, which will probably not work because // allowWindowOps is defaulted to false. - String resizeString = String.format("\033[8;%d;%dt", windowHeight, - windowWidth); - this.output.write(resizeString); - this.output.flush(); + if ((windowWidth > 0) && (windowHeight > 0)) { + String resizeString = String.format("\033[8;%d;%dt", windowHeight, + windowWidth); + this.output.write(resizeString); + this.output.flush(); + } } /**