|
@@ -531,11 +531,11 @@ begin
|
|
begin
|
|
begin
|
|
if (newPos <> FSelEnd) or (not AExtend and (FSelStart <> FSelEnd)) or (UserMode <> vsuEditText) then
|
|
if (newPos <> FSelEnd) or (not AExtend and (FSelStart <> FSelEnd)) or (UserMode <> vsuEditText) then
|
|
begin
|
|
begin
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
FSelEnd:= newPos;
|
|
FSelEnd:= newPos;
|
|
if not AExtend or (UserMode <> vsuEditText) then FSelStart:= FSelEnd;
|
|
if not AExtend or (UserMode <> vsuEditText) then FSelStart:= FSelEnd;
|
|
UserMode := vsuEditText;
|
|
UserMode := vsuEditText;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -1021,18 +1021,18 @@ begin
|
|
tl := GetTextLayout;
|
|
tl := GetTextLayout;
|
|
if (Key = skLeft) xor tl.ParagraphRightToLeft[tl.GetParagraphAt(FSelEnd)] then
|
|
if (Key = skLeft) xor tl.ParagraphRightToLeft[tl.GetParagraphAt(FSelEnd)] then
|
|
begin
|
|
begin
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
if FSelEnd > 0 then
|
|
if FSelEnd > 0 then
|
|
Dec(FSelEnd, tl.IncludeNonSpacingCharsBefore(FSelEnd,1) );
|
|
Dec(FSelEnd, tl.IncludeNonSpacingCharsBefore(FSelEnd,1) );
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
end else
|
|
end else
|
|
begin
|
|
begin
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
if FSelEnd < tl.CharCount then
|
|
if FSelEnd < tl.CharCount then
|
|
Inc(FSelEnd, tl.IncludeNonSpacingChars(FSelEnd,1) );
|
|
Inc(FSelEnd, tl.IncludeNonSpacingChars(FSelEnd,1) );
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
end;
|
|
end;
|
|
AHandled := true;
|
|
AHandled := true;
|
|
end else
|
|
end else
|
|
@@ -1045,17 +1045,17 @@ begin
|
|
newPos := tl.FindTextBelow(FSelEnd);
|
|
newPos := tl.FindTextBelow(FSelEnd);
|
|
if (newPos <> -1) or (not (ssShift in Shift) and (FSelStart <> FSelEnd)) then
|
|
if (newPos <> -1) or (not (ssShift in Shift) and (FSelStart <> FSelEnd)) then
|
|
begin
|
|
begin
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
FSelEnd := newPos;
|
|
FSelEnd := newPos;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
end;
|
|
end;
|
|
AHandled:= true;
|
|
AHandled:= true;
|
|
end else
|
|
end else
|
|
if Key = skHome then
|
|
if Key = skHome then
|
|
begin
|
|
begin
|
|
tl := GetTextLayout;
|
|
tl := GetTextLayout;
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
if ssCtrl in Shift then
|
|
if ssCtrl in Shift then
|
|
FSelEnd := 0
|
|
FSelEnd := 0
|
|
else
|
|
else
|
|
@@ -1064,13 +1064,13 @@ begin
|
|
FSelEnd := tl.ParagraphStartIndex[idxPara];
|
|
FSelEnd := tl.ParagraphStartIndex[idxPara];
|
|
end;
|
|
end;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
AHandled := true;
|
|
AHandled := true;
|
|
end else
|
|
end else
|
|
if Key = skEnd then
|
|
if Key = skEnd then
|
|
begin
|
|
begin
|
|
tl := GetTextLayout;
|
|
tl := GetTextLayout;
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
if ssCtrl in Shift then
|
|
if ssCtrl in Shift then
|
|
FSelEnd := tl.CharCount
|
|
FSelEnd := tl.CharCount
|
|
else
|
|
else
|
|
@@ -1079,7 +1079,7 @@ begin
|
|
FSelEnd := tl.ParagraphEndIndexBeforeParagraphSeparator[idxPara];
|
|
FSelEnd := tl.ParagraphEndIndexBeforeParagraphSeparator[idxPara];
|
|
end;
|
|
end;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
if not (ssShift in Shift) then FSelStart := FSelEnd;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
AHandled := true;
|
|
AHandled := true;
|
|
end else
|
|
end else
|
|
if Key = skReturn then
|
|
if Key = skReturn then
|
|
@@ -1127,10 +1127,10 @@ begin
|
|
end else
|
|
end else
|
|
if (Key = skA) and (ssCtrl in Shift) then
|
|
if (Key = skA) and (ssCtrl in Shift) then
|
|
begin
|
|
begin
|
|
- BeginUpdate;
|
|
|
|
|
|
+ BeginEditingUpdate;
|
|
FSelStart:= 0;
|
|
FSelStart:= 0;
|
|
FSelEnd:= GetTextLayout.CharCount;
|
|
FSelEnd:= GetTextLayout.CharCount;
|
|
- EndUpdate;
|
|
|
|
|
|
+ EndEditingUpdate;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|