mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:39:17 +02:00
SynEdit: Fix painting in Search and replace / issue #13702
git-svn-id: trunk@19956 -
This commit is contained in:
parent
324981825e
commit
9274d85e5b
@ -6924,7 +6924,7 @@ begin
|
|||||||
nReplaceLen := Length(AReplace);
|
nReplaceLen := Length(AReplace);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// search while the current search position is inside of the search range
|
// search while the current search position is inside of the search range
|
||||||
if bReplaceAll then IncPaintLock;
|
IncPaintLock;
|
||||||
try
|
try
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
//DebugLn(['TCustomSynEdit.SearchReplace ptStart=',dbgs(ptStart),' ptEnd=',dbgs(ptEnd),' ASearch="',dbgstr(ASearch),'" AReplace="',dbgstr(AReplace),'"']);
|
//DebugLn(['TCustomSynEdit.SearchReplace ptStart=',dbgs(ptStart),' ptEnd=',dbgs(ptEnd),' ASearch="',dbgstr(ASearch),'" AReplace="',dbgstr(AReplace),'"']);
|
||||||
@ -6953,8 +6953,13 @@ begin
|
|||||||
CurReplace:=fTSearch.RegExprReplace;
|
CurReplace:=fTSearch.RegExprReplace;
|
||||||
if bPrompt and Assigned(fOnReplaceText) then begin
|
if bPrompt and Assigned(fOnReplaceText) then begin
|
||||||
EnsureCursorPosVisible;
|
EnsureCursorPosVisible;
|
||||||
|
try
|
||||||
|
DecPaintLock;
|
||||||
nAction := DoOnReplaceText(ASearch,CurReplace,
|
nAction := DoOnReplaceText(ASearch,CurReplace,
|
||||||
ptFoundStart.Y,ptFoundStart.X);
|
ptFoundStart.Y,ptFoundStart.X);
|
||||||
|
finally
|
||||||
|
IncPaintLock;
|
||||||
|
end;
|
||||||
if nAction = raCancel then exit;
|
if nAction = raCancel then exit;
|
||||||
end else
|
end else
|
||||||
nAction := raReplace;
|
nAction := raReplace;
|
||||||
@ -6964,7 +6969,6 @@ begin
|
|||||||
if nAction = raReplaceAll then begin
|
if nAction = raReplaceAll then begin
|
||||||
if not bReplaceAll then begin
|
if not bReplaceAll then begin
|
||||||
bReplaceAll := TRUE;
|
bReplaceAll := TRUE;
|
||||||
IncPaintLock;
|
|
||||||
end;
|
end;
|
||||||
bPrompt := False;
|
bPrompt := False;
|
||||||
end;
|
end;
|
||||||
@ -7033,7 +7037,6 @@ begin
|
|||||||
if nAction = raReplaceAll then begin
|
if nAction = raReplaceAll then begin
|
||||||
if not bReplaceAll then begin
|
if not bReplaceAll then begin
|
||||||
bReplaceAll := TRUE;
|
bReplaceAll := TRUE;
|
||||||
IncPaintLock;
|
|
||||||
end;
|
end;
|
||||||
bPrompt := False;
|
bPrompt := False;
|
||||||
end;
|
end;
|
||||||
@ -7053,7 +7056,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
finally
|
finally
|
||||||
if bReplaceAll then DecPaintLock;
|
DecPaintLock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user