mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 10:39:08 +02:00
fixed range check error for TCustomSynAutoComplete.ExecuteCompletion in empty lines
git-svn-id: trunk@5738 -
This commit is contained in:
parent
922cb9f947
commit
a5ded8dcb0
@ -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;
|
||||
|
@ -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
|
||||
|
@ -17,8 +17,7 @@
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
{$mode objfpc}
|
||||
{$h+}
|
||||
{$mode objfpc}{$h+}
|
||||
unit DBActns;
|
||||
|
||||
interface
|
||||
|
Loading…
Reference in New Issue
Block a user