瀏覽代碼

* Set terminal correctly (fix for #21028)

git-svn-id: trunk@22153 -
michael 13 年之前
父節點
當前提交
04aa7851b7
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      packages/fcl-process/src/unix/process.inc

+ 3 - 3
packages/fcl-process/src/unix/process.inc

@@ -99,6 +99,8 @@ Function DetectXterm : String;
 
   begin
     Result:=FileSearch(s,GetEnvironmentVariable('PATH'),False)<>'';
+    If Result then
+      XTermProgram:=S;
   end;
 
   Function TestTerminals(Terminals : Array of String) : Boolean;
@@ -111,9 +113,7 @@ Function DetectXterm : String;
     While (Not Result) and (I<=High(Terminals)) do
       begin
       Result:=TestTerminal(Terminals[i]);
-      If Result then
-        XTermProgram:=Terminals[i];
-       inc(i);
+      inc(i);
       end;
   end;