From a0aaed2f3e2820f58e642ff820a1def4239ed7e9 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 3 Sep 2012 19:19:54 +0000 Subject: [PATCH] ide: automatic selection of console program when launching program (if predefined not available) git-svn-id: svn://ultimatepp.org/upp/trunk@5315 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Core/Host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/ide/Core/Host.cpp b/uppsrc/ide/Core/Host.cpp index 2bb12e5f4..00c8a432d 100644 --- a/uppsrc/ide/Core/Host.cpp +++ b/uppsrc/ide/Core/Host.cpp @@ -212,7 +212,6 @@ void LocalHost::Launch(const char *_cmdline, bool console) #endif #ifdef PLATFORM_POSIX String script = ConfigFile("console-script-" + AsString(getpid()) + ".tmp"); - int c = LinuxHostConsole.FindFirstOf(" "); String lc; static const char *term[] = { "/usr/bin/mate-terminal -x", @@ -222,6 +221,7 @@ void LocalHost::Launch(const char *_cmdline, bool console) }; int ii = 0; for(;;) { // If (pre)defined terminal emulator is not available, try to find one + int c = LinuxHostConsole.FindFirstOf(" "); lc = c < 0 ? LinuxHostConsole : LinuxHostConsole.Left(c); DDUMP(lc); if(ii >= __countof(term) || FileExists(lc))