SynEdit: fix adjusting selection on empty edit (lines.count = 0) for SetTextBetweenPoints

git-svn-id: trunk@61678 -
This commit is contained in:
martin 2019-08-10 18:54:52 +00:00
parent 8e33ddad91
commit 053a87352a

View File

@ -2191,7 +2191,7 @@ end;
procedure TSynEditSelection.ConstrainStartLineBytePos(var Value: TPoint);
begin
Value.y := MinMax(Value.y, 1, fLines.Count);
Value.y := MinMax(Value.y, 1, Max(fLines.Count, 1));
if (FCaret = nil) or FCaret.AllowPastEOL then
Value.x := Max(Value.x, 1)