2
0
Martijn Laan 1 жил өмнө
parent
commit
c00990b64c

+ 18 - 0
Projects/Src/IDE.HelperFunc.pas

@@ -80,6 +80,7 @@ function CreateBitmapInfo(const Width, Height, BitCount: Integer): TBitmapInfo;
 function GetWordOccurrenceFindOptions: TScintFindOptions;
 function GetSelTextOccurrenceFindOptions: TScintFindOptions;
 function GetPreferredMemoFont: String;
+function DoubleAmp(const S: String): String;
 
 implementation
 
@@ -871,6 +872,23 @@ begin
   Result := PreferredMemoFont;
 end;
 
+function DoubleAmp(const S: String): String;
+var
+  I: Integer;
+begin
+  Result := S;
+  I := 1;
+  while I <= Length(Result) do begin
+    if Result[I] = '&' then begin
+      Inc(I);
+      Insert('&', Result, I);
+      Inc(I);
+    end
+    else
+      Inc(I, PathCharLength(S, I));
+  end;
+end;
+
 initialization
   var OSVersionInfo: TOSVersionInfo;
   OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo);

+ 0 - 17
Projects/Src/IDE.MainForm.pas

@@ -2316,23 +2316,6 @@ begin
   end;
 end;
 
-function DoubleAmp(const S: String): String;
-var
-  I: Integer;
-begin
-  Result := S;
-  I := 1;
-  while I <= Length(Result) do begin
-    if Result[I] = '&' then begin
-      Inc(I);
-      Insert('&', Result, I);
-      Inc(I);
-    end
-    else
-      Inc(I, PathCharLength(S, I));
-  end;
-end;
-
 procedure TMainForm.FMenuClick(Sender: TObject);
 var
   I: Integer;