mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 07:02:50 +02:00
SourceEditor: Fix Search result, if found-text was already selected. issue #0019228
git-svn-id: trunk@30479 -
This commit is contained in:
parent
22ef1d3d82
commit
7c7534b4fc
@ -2675,7 +2675,6 @@ end;
|
||||
function TSourceEditor.DoFindAndReplace(aFindText, aReplaceText: String;
|
||||
anOptions: TSynSearchOptions): integer;
|
||||
var
|
||||
OldCaretXY: TPoint;
|
||||
AText, ACaption: String;
|
||||
begin
|
||||
Result:=0;
|
||||
@ -2686,7 +2685,6 @@ begin
|
||||
if SourceNotebook<>nil then
|
||||
Manager.AddJumpPointClicked(Self);
|
||||
|
||||
OldCaretXY:=EditorComponent.CaretXY;
|
||||
//debugln('TSourceEditor.DoFindAndReplace A aFindText="',dbgstr(aFindText),'" ssoEntireScope=',dbgs(ssoEntireScope in anOptions),' ssoBackwards=',dbgs(ssoBackwards in anOptions));
|
||||
try
|
||||
Result:=EditorComponent.SearchReplace(aFindText, aReplaceText, anOptions);
|
||||
@ -2698,9 +2696,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if (OldCaretXY.X = EditorComponent.CaretX) and
|
||||
(OldCaretXY.Y = EditorComponent.CaretY) and
|
||||
not (ssoReplaceAll in anOptions)
|
||||
if (Result = 0) and not (ssoReplaceAll in anOptions)
|
||||
then begin
|
||||
ACaption := lisUENotFound;
|
||||
AText := Format(lisUESearchStringNotFound, [ValidUTF8String(aFindText)]);
|
||||
|
Loading…
Reference in New Issue
Block a user