diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index fbcb9ce136..bb070c6e18 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -3062,7 +3062,11 @@ begin Manager.AddJumpPointClicked(Self); OldEntireScope := ssoEntireScope in anOptions; - Again:=False; + //do not show lisUESearchStringContinueBeg/lisUESearchStringContinueEnd if the caret is in the beginning/end + if ssoBackwards in anOptions then + Again := ((FEditor.CaretY >= FEditor.Lines.Count) and (FEditor.CaretX > Length(FEditor.LineText)))//caret in the last line and last character + else + Again := ((FEditor.CaretY = 1) and (FEditor.CaretX = 1));//caret at the top/left repeat try Result:=EditorComponent.SearchReplace(aFindText, aReplaceText, anOptions);