mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
SynCompletion: Ensure caret pos
git-svn-id: trunk@38655 -
This commit is contained in:
parent
1a0c213794
commit
ba3925a8de
@ -243,7 +243,7 @@ var
|
||||
i, j, Len, IndentLen, TokenStartX: integer;
|
||||
s: string;
|
||||
IdxMaybe, NumMaybe: integer;
|
||||
p: TPoint;
|
||||
p, p2: TPoint;
|
||||
NewCaretPos: boolean;
|
||||
Temp: TStringList;
|
||||
begin
|
||||
@ -369,7 +369,9 @@ begin
|
||||
Temp.Free;
|
||||
end;
|
||||
// replace the selected text and position the caret
|
||||
AEditor.SelText := s;
|
||||
p2 := AEditor.BlockBegin;
|
||||
AEditor.SelText := '';
|
||||
AEditor.SetTextBetweenPoints(p2, p2, s, [], scamEnd);
|
||||
if NewCaretPos then
|
||||
AEditor.CaretXY := p;
|
||||
AEditor.EnsureCursorPosVisible;
|
||||
|
Loading…
Reference in New Issue
Block a user