mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 18:42:40 +02:00
fixed regular expression replace
git-svn-id: trunk@2535 -
This commit is contained in:
parent
8a20f63127
commit
b50a6411c4
@ -6604,6 +6604,8 @@ begin
|
||||
nFound := fTSearch.Results[n];
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
nSearchLen := fTSearch.ResultLengths[n];
|
||||
CurReplace := fTSearch.GetReplace(n);
|
||||
nReplaceLen := Length(CurReplace);
|
||||
{$ENDIF}
|
||||
if bBackward then Dec(n) else Inc(n);
|
||||
Dec(nInLine);
|
||||
@ -6620,14 +6622,10 @@ begin
|
||||
if not bBackward then CaretXY := ptCurrent;
|
||||
// If it's a search only we can leave the procedure now.
|
||||
if not (bReplace or bReplaceAll) then exit;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
nSearchLen := fTSearch.ResultLengths[n];
|
||||
CurReplace := fTSearch.GetReplace(n);
|
||||
nReplaceLen := Length(CurReplace);
|
||||
{$ENDIF}
|
||||
// Prompt and replace or replace all. If user chooses to replace
|
||||
// all after prompting, turn off prompting.
|
||||
if bPrompt and Assigned(fOnReplaceText) then begin
|
||||
EnsureCursorPosVisible;
|
||||
nAction := DoOnReplaceText(ASearch,
|
||||
{$IFDEF SYN_LAZARUS}CurReplace{$ELSE}AReplace{$ENDIF},
|
||||
ptCurrent.Y, nFound);
|
||||
|
Loading…
Reference in New Issue
Block a user