mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 11:52:37 +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];
|
nFound := fTSearch.Results[n];
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
nSearchLen := fTSearch.ResultLengths[n];
|
nSearchLen := fTSearch.ResultLengths[n];
|
||||||
|
CurReplace := fTSearch.GetReplace(n);
|
||||||
|
nReplaceLen := Length(CurReplace);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if bBackward then Dec(n) else Inc(n);
|
if bBackward then Dec(n) else Inc(n);
|
||||||
Dec(nInLine);
|
Dec(nInLine);
|
||||||
@ -6620,14 +6622,10 @@ begin
|
|||||||
if not bBackward then CaretXY := ptCurrent;
|
if not bBackward then CaretXY := ptCurrent;
|
||||||
// If it's a search only we can leave the procedure now.
|
// If it's a search only we can leave the procedure now.
|
||||||
if not (bReplace or bReplaceAll) then exit;
|
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
|
// Prompt and replace or replace all. If user chooses to replace
|
||||||
// all after prompting, turn off prompting.
|
// all after prompting, turn off prompting.
|
||||||
if bPrompt and Assigned(fOnReplaceText) then begin
|
if bPrompt and Assigned(fOnReplaceText) then begin
|
||||||
|
EnsureCursorPosVisible;
|
||||||
nAction := DoOnReplaceText(ASearch,
|
nAction := DoOnReplaceText(ASearch,
|
||||||
{$IFDEF SYN_LAZARUS}CurReplace{$ELSE}AReplace{$ENDIF},
|
{$IFDEF SYN_LAZARUS}CurReplace{$ELSE}AReplace{$ENDIF},
|
||||||
ptCurrent.Y, nFound);
|
ptCurrent.Y, nFound);
|
||||||
|
Loading…
Reference in New Issue
Block a user