fixed range check error for TCustomSynAutoComplete.ExecuteCompletion in empty lines

git-svn-id: trunk@5738 -
This commit is contained in:
mattias 2004-08-04 16:41:07 +00:00
parent 922cb9f947
commit a5ded8dcb0
3 changed files with 7 additions and 5 deletions

View File

@ -291,6 +291,7 @@ begin
{$IFDEF SYN_LAZARUS}
TokenStartX:=p.x;
s:=AEditor.Lines[p.y-1];
if TokenStartX>length(s) then TokenStartX:=length(s);
while (TokenStartX > 1) and (s[TokenStartX-1] > ' ')
and (Pos(s[TokenStartX-1], fEOTokenChars) = 0) do
Dec(TokenStartX);
@ -304,7 +305,9 @@ begin
IndentLen:=1;
if (p.y>0) and (p.y<=AEditor.Lines.Count) then begin
s:=AEditor.Lines[p.y-1];
while (IndentLen<p.x) and (s[IndentLen]<=' ') do inc(IndentLen);
while (IndentLen<p.x)
and ((IndentLen>length(s)) or (s[IndentLen]<=' ')) do
inc(IndentLen);
end;
dec(IndentLen);
end;

View File

@ -240,8 +240,8 @@ begin
Dest.ImageIndex:=Src.ImageIndex;
Dest.ShortCut:=Src.ShortCut;
Dest.Visible:=Src.Visible;
if (Dest.ImageIndex>=0) then begin
// TODO: action image list
if (Dest is TContainedAction) and (Dest.ImageIndex>=0) then begin
end;
end;
finally

View File

@ -17,8 +17,7 @@
* *
*****************************************************************************
}
{$mode objfpc}
{$h+}
{$mode objfpc}{$h+}
unit DBActns;
interface