mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 22:58:18 +02:00
SynEdit: Syncron-edit mode, fixed multi-line edit / indent on new-line
git-svn-id: trunk@20927 -
This commit is contained in:
parent
2112f6e3fa
commit
4c64826e61
@ -824,19 +824,24 @@ begin
|
||||
CurCell := FCells[FCurrentCell];
|
||||
a := CurCell.Group;
|
||||
Pos.Y := Pos.Y - CurCell.LogStart.y;
|
||||
if Pos.y = 0 then
|
||||
Pos.X := Pos.X - CurCell.LogStart.x;
|
||||
for i := 0 to FCells.Count - 1 do
|
||||
if Pos.y = 0
|
||||
then Pos.X := Pos.X - CurCell.LogStart.x
|
||||
else dec(Pos.x);
|
||||
for i := 0 to FCells.Count - 1 do begin
|
||||
if FCells[i].LogStart.Y = FCells[i].LogEnd.Y
|
||||
then x2 := FCells[i].LogStart.X + Pos.X
|
||||
else x2 := 1 + Pos.X;
|
||||
if (i <> FCurrentCell) and (FCells[i].Group = a) and
|
||||
( (FCells[i].LogStart.Y + Pos.Y < FCells[i].LogEnd.Y) or
|
||||
( (FCells[i].LogStart.Y + Pos.Y = FCells[i].LogEnd.Y) and
|
||||
(FCells[i].LogStart.X + Pos.X <= FCells[i].LogEnd.X))
|
||||
(x2 <= FCells[i].LogEnd.X) )
|
||||
)
|
||||
then begin
|
||||
Y2 := FCells[i].LogStart.Y + Pos.Y;
|
||||
X2 := Pos.X;
|
||||
if Pos.Y = 0 then
|
||||
X2 := X2 + FCells[i].LogStart.X;
|
||||
if Pos.Y = 0
|
||||
then X2 := X2 + FCells[i].LogStart.X
|
||||
else inc(X2);
|
||||
if aLineBrkCnt = -1 then begin
|
||||
ViewedTextBuffer.EditLineJoin(Y2);
|
||||
if (CaretPos.y > Y2) then begin
|
||||
@ -875,6 +880,7 @@ begin
|
||||
inc(CaretPos.X, aCount);
|
||||
end;
|
||||
end;
|
||||
end
|
||||
finally
|
||||
ViewedTextBuffer.EndUpdate;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user