misc cleanup
[fanfix.git] / src / jexer / TTerminalWindow.java
index a624e6c50574709fe4acd969184c62a5d6dc76ae..897dca73cdf376fff4d6aace269ba48396456f35 100644 (file)
@@ -101,7 +101,7 @@ public class TTerminalWindow extends TScrollableWindow
     public TTerminalWindow(final TApplication application, final int x,
         final int y, final String commandLine) {
 
-        this(application, x, y, RESIZABLE, commandLine.split("\\s"),
+        this(application, x, y, RESIZABLE, commandLine.split("\\s+"),
             System.getProperty("jexer.TTerminal.closeOnExit",
                 "false").equals("true"));
     }
@@ -118,7 +118,7 @@ public class TTerminalWindow extends TScrollableWindow
     public TTerminalWindow(final TApplication application, final int x,
         final int y, final String commandLine, final boolean closeOnExit) {
 
-        this(application, x, y, RESIZABLE, commandLine.split("\\s"),
+        this(application, x, y, RESIZABLE, commandLine.split("\\s+"),
             closeOnExit);
     }
 
@@ -247,16 +247,16 @@ public class TTerminalWindow extends TScrollableWindow
                 equals("true"))
         ) {
             ptypipe = true;
-            spawnShell(cmdShellPtypipe.split("\\s"));
+            spawnShell(cmdShellPtypipe.split("\\s+"));
         } else if (System.getProperty("os.name").startsWith("Windows")) {
-            spawnShell(cmdShellWindows.split("\\s"));
+            spawnShell(cmdShellWindows.split("\\s+"));
         } else if (System.getProperty("os.name").startsWith("Mac")) {
-            spawnShell(cmdShellBSD.split("\\s"));
+            spawnShell(cmdShellBSD.split("\\s+"));
         } else if (System.getProperty("os.name").startsWith("Linux")) {
-            spawnShell(cmdShellGNU.split("\\s"));
+            spawnShell(cmdShellGNU.split("\\s+"));
         } else {
             // When all else fails, assume GNU.
-            spawnShell(cmdShellGNU.split("\\s"));
+            spawnShell(cmdShellGNU.split("\\s+"));
         }
     }
 
@@ -788,6 +788,7 @@ public class TTerminalWindow extends TScrollableWindow
         // Synchronize against the emulator so we don't stomp on its reader
         // thread.
         synchronized (emulator) {
+            setHiddenMouse(emulator.hasHiddenMousePointer());
 
             setCursorX(emulator.getCursorX() + 1);
             setCursorY(emulator.getCursorY() + 1
@@ -853,7 +854,7 @@ public class TTerminalWindow extends TScrollableWindow
      * @param mouse a mouse-based event
      * @return whether or not the mouse is on the emulator
      */
-    private final boolean mouseOnEmulator(final TMouseEvent mouse) {
+    private boolean mouseOnEmulator(final TMouseEvent mouse) {
 
         synchronized (emulator) {
             if (!emulator.isReading()) {