SynEdit: Refactored Block-Selection / Fix paste text beyond end of line. issue #14199

git-svn-id: trunk@20964 -
This commit is contained in:
martin 2009-07-26 12:49:53 +00:00
parent 263867bb86
commit cb577dee7e

View File

@ -1043,7 +1043,7 @@ var
SelChanged: boolean;
begin
Value.y := MinMax(Value.y, 1, fLines.Count);
if (FCaret <> nil) and FCaret.AllowPastEOL then
if (FCaret = nil) or FCaret.AllowPastEOL then
Value.x := Max(Value.x, 1)
else
Value.x := MinMax(Value.x, 1, length(Lines[Value.y - 1])+1);
@ -1079,7 +1079,7 @@ procedure TSynEditSelection.AdjustStartLineBytePos(Value: TPoint);
begin
if FEnabled then begin
Value.y := MinMax(Value.y, 1, fLines.Count);
if (FCaret <> nil) and FCaret.AllowPastEOL then
if (FCaret = nil) or FCaret.AllowPastEOL then
Value.x := Max(Value.x, 1)
else
Value.x := MinMax(Value.x, 1, length(Lines[Value.y - 1])+1);
@ -1117,7 +1117,7 @@ var
begin
if FEnabled then begin
Value.y := MinMax(Value.y, 1, fLines.Count);
if (FCaret <> nil) and FCaret.AllowPastEOL then
if (FCaret = nil) or FCaret.AllowPastEOL then
Value.x := Max(Value.x, 1)
else
Value.x := MinMax(Value.x, 1, length(Lines[Value.y - 1])+1);