mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
* use always insert mode when replacing text, resolves #9476
git-svn-id: trunk@8798 -
This commit is contained in:
parent
3744241d04
commit
792f07c7c8
@ -6051,6 +6051,7 @@ var S: string;
|
|||||||
Re: word;
|
Re: word;
|
||||||
IFindStr : string;
|
IFindStr : string;
|
||||||
BT : BTable;
|
BT : BTable;
|
||||||
|
Overwriting : boolean;
|
||||||
|
|
||||||
function ContainsText(const SubS:string;var S: string; Start: Sw_integer): Sw_integer;
|
function ContainsText(const SubS:string;var S: string; Start: Sw_integer): Sw_integer;
|
||||||
var
|
var
|
||||||
@ -6302,6 +6303,9 @@ begin
|
|||||||
if CanReplace then
|
if CanReplace then
|
||||||
begin
|
begin
|
||||||
Lock;
|
Lock;
|
||||||
|
{ don't use SetInsertMode here because it changes the cursor shape }
|
||||||
|
overwriting:=(GetFlags and efInsertMode)=0;
|
||||||
|
SetFlags(GetFlags or efInsertMode);
|
||||||
SetSelection(A,B);
|
SetSelection(A,B);
|
||||||
DelSelect;
|
DelSelect;
|
||||||
InsertText(ReplaceStr);
|
InsertText(ReplaceStr);
|
||||||
@ -6315,6 +6319,8 @@ begin
|
|||||||
X:=A.X;
|
X:=A.X;
|
||||||
Y:=A.Y;
|
Y:=A.Y;
|
||||||
end;
|
end;
|
||||||
|
if overwriting then
|
||||||
|
SetFlags(GetFlags and (not efInsertMode));
|
||||||
UnLock;
|
UnLock;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user