mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:16:25 +02:00
IDE: source editor: fixed marking skipped directives as disabled
git-svn-id: trunk@42482 -
This commit is contained in:
parent
fb86536307
commit
d01d5e1399
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user