Martijn Laan 1 tahun lalu
induk
melakukan
38bfd96652

+ 4 - 4
Components/ScintEdit.pas

@@ -649,8 +649,8 @@ end;
 
 
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longint;
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longint;
 begin
 begin
-  var WarnStatus: Integer;
-  Result := Call(Msg, WParam, LParam, WarnStatus);
+  var Dummy: Integer;
+  Result := Call(Msg, WParam, LParam, Dummy);
 end;
 end;
 
 
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint;
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint;
@@ -678,8 +678,8 @@ end;
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint;
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint;
   const LParamStr: TScintRawString): Longint;
   const LParamStr: TScintRawString): Longint;
 begin
 begin
-  var WarnStatus: Integer;
-  Result := Call(Msg, WParam, LParamStr, WarnStatus);
+  var Dummy: Integer;
+  Result := Call(Msg, WParam, LParamStr, Dummy);
 end;
 end;
 
 
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint;
 function TScintEdit.Call(Msg: Cardinal; WParam: Longint;

+ 1 - 1
Projects/Src/Compil32/CompForm.pas

@@ -3745,7 +3745,7 @@ begin
         mbInformation, MB_OK);
         mbInformation, MB_OK);
   end
   end
   else begin
   else begin
-    if FActiveMemo.MainSelTextEquals(FLastFindText, FindOptionsToSearchOptions(FLastFindOptions - [frWholeWord], FLastFindRegEx)) then begin
+    if FActiveMemo.MainSelTextEquals(FLastFindText, FindOptionsToSearchOptions(frMatchCase in FLastFindOptions, FLastFindRegEx)) then begin
       { Note: the MainSelTextEquals above performs a search so the replacement
       { Note: the MainSelTextEquals above performs a search so the replacement
         below is safe even if the user just enabled regex }
         below is safe even if the user just enabled regex }
       FActiveMemo.ReplaceMainSelText(FLastReplaceText, ReplaceMode);
       FActiveMemo.ReplaceMainSelText(FLastReplaceText, ReplaceMode);

+ 13 - 1
Projects/Src/Compil32/CompFunc.pas

@@ -68,7 +68,9 @@ procedure SetLowPriority(ALowPriority: Boolean; var SavePriorityClass: DWORD);
 procedure SetHelpFileDark(const Dark: Boolean);
 procedure SetHelpFileDark(const Dark: Boolean);
 function GetHelpFile: String;
 function GetHelpFile: String;
 function FindOptionsToSearchOptions(const FindOptions: TFindOptions;
 function FindOptionsToSearchOptions(const FindOptions: TFindOptions;
-  const RegEx: Boolean): TScintFindOptions;
+  const RegEx: Boolean): TScintFindOptions; overload;
+function FindOptionsToSearchOptions(const MatchCase: Boolean;
+  const RegEx: Boolean): TScintFindOptions; overload;
 function RegExToReplaceMode(const RegEx: Boolean): TScintReplaceMode;
 function RegExToReplaceMode(const RegEx: Boolean): TScintReplaceMode;
 procedure StartAddRemovePrograms;
 procedure StartAddRemovePrograms;
 function GetSourcePath(const AFilename: String): String;
 function GetSourcePath(const AFilename: String): String;
@@ -731,6 +733,16 @@ begin
     Include(Result, sfoRegEx);
     Include(Result, sfoRegEx);
 end;
 end;
 
 
+function FindOptionsToSearchOptions(const MatchCase: Boolean;
+  const RegEx: Boolean): TScintFindOptions; overload;
+begin
+  Result := [];
+  if MatchCase then
+    Include(Result, sfoMatchCase);
+  if RegEx then
+    Include(Result, sfoRegEx);
+end;
+
 function RegExToReplaceMode(const RegEx: Boolean): TScintReplaceMode;
 function RegExToReplaceMode(const RegEx: Boolean): TScintReplaceMode;
 begin
 begin
   if RegEx then
   if RegEx then