IDE: source editor: fixed marking skipped directives as disabled

git-svn-id: trunk@42482 -
This commit is contained in:
mattias 2013-08-24 18:19:46 +00:00
parent fb86536307
commit d01d5e1399
2 changed files with 6 additions and 6 deletions

View File

@ -267,9 +267,9 @@ const
type
TLSDirectiveState = (
lsdsActive,
lsdsInactive,// e.g. an IfDef which code was skipped
lsdsSkipped // has inactive parent
lsdsActive, // was executed
lsdsInactive,// was executed, but expression result was false and following code was skipped
lsdsSkipped // was not executed
);
TLSDirectiveStates = set of TLSDirectiveState;

View File

@ -5509,11 +5509,11 @@ begin
until (ADirective^.SrcPos<>SrcPos) or (TCodeBuffer(ADirective^.Code)<>Code)
or (i > Scanner.DirectiveCount);
dec(i);
if (ActiveCnt=1) and (InactiveCnt=0) and (SkippedCnt=0) then
if (ActiveCnt>0) and (InactiveCnt=0) and (SkippedCnt=0) then
SynState:=idnEnabled
else if (InactiveCnt=1) and (ActiveCnt=0) and (SkippedCnt=0) then
else if (ActiveCnt=0) and (InactiveCnt+SkippedCnt>0) then
SynState:=idnDisabled
else if (InactiveCnt>0) or (ActiveCnt>0) then
else if (ActiveCnt>0) then
SynState:=idnTempEnabled
else
SynState:=idnInvalid;