SynEdit: Syncro/Template-edit, fix adjusting work area, if it ends exactly at end of last cell. Fix adjusting points on line insert (exactly at point)

git-svn-id: trunk@60063 -
This commit is contained in:
martin 2019-01-12 17:48:45 +00:00
parent 33c6cbeb45
commit cf72a12b68

View File

@ -962,7 +962,7 @@ var
if aLineBrkCnt > 0 then begin
(* Lines Inserted *)
if aPoint.y >= aLinePos then begin
if (aPoint.y = aLinePos) and (aPoint.x > Pos.x) then
if (aPoint.y = aLinePos) and (aPoint.x >= Pos.x) then
Result.x := Result.x - Pos.x + 1;
Result.y := Result.y + aLineBrkCnt;
end;
@ -1003,7 +1003,7 @@ begin
if (a > 0) then
CurCell.LogStart := AdjustPoint(CurCell.LogStart, chg);
a := CompareCarets(Pos, CurCell.LogEnd);
if (a > 0) or ((a = 0) and ((i = FCurrentCell) or edit)) then
if (a > 0) or ((a = 0) and ((i = FCurrentCell) or (CurCell.Group = -1) or edit)) then
CurCell.LogEnd := AdjustPoint(CurCell.LogEnd, chg);
if chg then
Cells[i] := CurCell;