X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=f85e346e4a230f646e6e41635941a516e6281f72;hb=b5f2a6dbf2f2b925007a85f68665103ec3514f84;hp=336c3ff8db7cd19c2a6761f98469cc869f0b6b78;hpb=bd8d51fa0a33d6d27dba088c57791e1650512fc0;p=nikiroo-utils.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 336c3ff..f85e346 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -208,7 +208,7 @@ public class TTerminalWindow extends TWindow { Cell ch = line.charAt(i); Cell newCell = new Cell(); newCell.setTo(ch); - boolean reverse = line.isReverseColor() ^ ch.getReverse(); + boolean reverse = line.isReverseColor() ^ ch.isReverse(); newCell.setReverse(false); if (reverse) { newCell.setBackColor(ch.getForeColor()); @@ -242,7 +242,12 @@ public class TTerminalWindow extends TWindow { * Handle window close. */ @Override public void onClose() { - emulator.close(); + if (shell != null) { + shell.destroy(); + shell = null; + } else { + emulator.close(); + } } /** @@ -260,12 +265,12 @@ public class TTerminalWindow extends TWindow { if (vScroller != null) { setCursorY(getCursorY() - vScroller.getValue()); } - setHasCursor(emulator.visibleCursor()); + setCursorVisible(emulator.isCursorVisible()); if (getCursorX() > getWidth() - 2) { - setHasCursor(false); + setCursorVisible(false); } if ((getCursorY() > getHeight() - 2) || (getCursorY() < 0)) { - setHasCursor(false); + setCursorVisible(false); } if (emulator.getScreenTitle().length() > 0) { // Only update the title if the shell is still alive @@ -439,11 +444,11 @@ public class TTerminalWindow extends TWindow { return; } - if (mouse.getMouseWheelUp()) { + if (mouse.isMouseWheelUp()) { vScroller.decrement(); return; } - if (mouse.getMouseWheelDown()) { + if (mouse.isMouseWheelDown()) { vScroller.increment(); return; }