mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 06:39:26 +02:00
SynEdit: Ifdef Markup: prevent endless loop
git-svn-id: trunk@41384 -
This commit is contained in:
parent
520aa7c32b
commit
1be10bb6e1
@ -5520,14 +5520,16 @@ begin
|
||||
if SynState=idnInvalid then
|
||||
SynState:=idnDisabled;
|
||||
end;
|
||||
if i=Scanner.DirectiveCount then break;
|
||||
ADirective:=Scanner.DirectivesSorted[i];
|
||||
if i < Scanner.DirectiveCount then begin
|
||||
ADirective:=Scanner.DirectivesSorted[i];
|
||||
{$IFDEF VerboseUpdateIfDefNodeStates}
|
||||
if (Pos(VFilePattern,Code.Filename)>0) and (Y>=VMinY) and (Y<=VMaxY) and (ADirective^.SrcPos=SrcPos) then
|
||||
debugln(['TSourceEditor.UpdateIfDefNodeStates ',i,'/',Scanner.DirectiveCount,' MERGING ',dbgs(ADirective^.Code),' ',Code.Filename,' X=',X,' Y=',Y,' SrcPos=',aDirective^.SrcPos,' State=',dbgs(aDirective^.State)]);
|
||||
{$ENDIF}
|
||||
end;
|
||||
inc(i);
|
||||
{$IFDEF VerboseUpdateIfDefNodeStates}
|
||||
if (Pos(VFilePattern,Code.Filename)>0) and (Y>=VMinY) and (Y<=VMaxY) and (ADirective^.SrcPos=SrcPos) then
|
||||
debugln(['TSourceEditor.UpdateIfDefNodeStates ',i,'/',Scanner.DirectiveCount,' MERGING ',dbgs(ADirective^.Code),' ',Code.Filename,' X=',X,' Y=',Y,' SrcPos=',aDirective^.SrcPos,' State=',dbgs(aDirective^.State)]);
|
||||
{$ENDIF}
|
||||
until (ADirective^.SrcPos<>SrcPos) or (TCodeBuffer(ADirective^.Code)<>Code);
|
||||
until (ADirective^.SrcPos<>SrcPos) or (TCodeBuffer(ADirective^.Code)<>Code)
|
||||
or (i > Scanner.DirectiveCount);
|
||||
dec(i);
|
||||
{$IFDEF VerboseUpdateIfDefNodeStates}
|
||||
if (Pos(VFilePattern,Code.Filename)>0) and (Y>=VMinY) and (Y<=VMaxY) then
|
||||
|
Loading…
Reference in New Issue
Block a user