Fixed for TJ
[fanfix.git] / src / jexer / TApplication.java
index e319a4df410dba7ae7c7ab552dfa1d5e824fb47d..cfa81f4bab05f6508cdbefe7acb53ed096a1df1e 100644 (file)
@@ -2836,6 +2836,22 @@ public class TApplication implements Runnable {
         return openTerminal(x, y, TWindow.RESIZABLE, commandLine);
     }
 
+    /**
+     * Convenience function to open a terminal window and execute a custom
+     * command line inside it.
+     *
+     * @param x column relative to parent
+     * @param y row relative to parent
+     * @param flags mask of CENTERED, MODAL, or RESIZABLE
+     * @param command the command line to execute
+     * @return the terminal new window
+     */
+    public final TTerminalWindow openTerminal(final int x, final int y,
+        final int flags, final String [] command) {
+
+        return new TTerminalWindow(this, x, y, flags, command);
+    }
+
     /**
      * Convenience function to open a terminal window and execute a custom
      * command line inside it.
@@ -2849,7 +2865,7 @@ public class TApplication implements Runnable {
     public final TTerminalWindow openTerminal(final int x, final int y,
         final int flags, final String commandLine) {
 
-        return new TTerminalWindow(this, x, y, flags, commandLine);
+        return new TTerminalWindow(this, x, y, flags, commandLine.split("\\s"));
     }
 
     /**