2
0
Эх сурвалжийг харах

* Set terminal correctly (fix for #21028)

git-svn-id: trunk@22153 -
michael 13 жил өмнө
parent
commit
04aa7851b7

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

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