X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWindow.java;h=65eaa4835d342e00d1cf7065b44c5eea1b20bcce;hb=a83fea2bae838f4b9bbf59ce3832e0e67be41378;hp=2fc4aa5d578288da8cf9daf18cecee088eacdccf;hpb=34a42e784bf1238c6bb2847c52d7c841fcfdef5f;p=fanfix.git diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index 2fc4aa5..65eaa48 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -751,22 +751,30 @@ public class TWindow extends TWidget { } } if (keypress.equals(kbShiftLeft)) { - if (getWidth() > minimumWindowWidth) { + if ((getWidth() > minimumWindowWidth) + || (minimumWindowWidth <= 0) + ) { setWidth(getWidth() - 1); } } if (keypress.equals(kbShiftRight)) { - if (getWidth() < maximumWindowWidth) { + if ((getWidth() < maximumWindowWidth) + || (maximumWindowWidth <= 0) + ) { setWidth(getWidth() + 1); } } if (keypress.equals(kbShiftUp)) { - if (getHeight() > minimumWindowHeight) { + if ((getHeight() > minimumWindowHeight) + || (minimumWindowHeight <= 0) + ) { setHeight(getHeight() - 1); } } if (keypress.equals(kbShiftDown)) { - if (getHeight() < maximumWindowHeight) { + if ((getHeight() < maximumWindowHeight) + || (maximumWindowHeight <= 0) + ) { setHeight(getHeight() + 1); } }