SynEdit: Paste of column-mode block, would fail if the inserted text hit the EOF. Patch by dmitry boyarintsev

git-svn-id: trunk@18914 -
This commit is contained in:
martin 2009-03-07 21:31:15 +00:00
parent dd1e90c57b
commit ca8233b52a

View File

@ -764,7 +764,7 @@ var
if P <> Start then begin
SetLength(Str, P - Start);
Move(Start^, Str[1], P - Start);
if FCaret.LinePos > FLines.Count then
if FCaret.LinePos > FLines.Count then {useless check. FCaret.LinePos cannot exceed FLines.Count}
FLines.Add(StringOfChar(' ', InsertPos - 1) + Str)
else begin
TempString := FLines[FCaret.LinePos - 1];
@ -792,6 +792,8 @@ var
inc(p,2)
else
Inc(P);
if FCaret.LinePos = FLines.Count then
FLines.Add(StringOfChar(' ', InsertPos - 1));
FCaret.LinePos := FCaret.LinePos + 1;
end;
Start := P;