mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 00:00:39 +02:00
SynEdit: fix adjusting selection on empty edit (lines.count = 0) for SetTextBetweenPoints
git-svn-id: trunk@61678 -
This commit is contained in:
parent
8e33ddad91
commit
053a87352a
@ -2191,7 +2191,7 @@ end;
|
|||||||
|
|
||||||
procedure TSynEditSelection.ConstrainStartLineBytePos(var Value: TPoint);
|
procedure TSynEditSelection.ConstrainStartLineBytePos(var Value: TPoint);
|
||||||
begin
|
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
|
if (FCaret = nil) or FCaret.AllowPastEOL then
|
||||||
Value.x := Max(Value.x, 1)
|
Value.x := Max(Value.x, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user