retrofit from GJexer
[nikiroo-utils.git] / src / jexer / TTerminalWindow.java
index a624e6c50574709fe4acd969184c62a5d6dc76ae..b55e7b05bc1137600ea337cb71acc2ba29976b87 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,7 +788,8 @@ 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
                 + (getHeight() - 2 - emulator.getHeight())