mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 20:40:36 +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
|
type
|
||||||
TLSDirectiveState = (
|
TLSDirectiveState = (
|
||||||
lsdsActive,
|
lsdsActive, // was executed
|
||||||
lsdsInactive,// e.g. an IfDef which code was skipped
|
lsdsInactive,// was executed, but expression result was false and following code was skipped
|
||||||
lsdsSkipped // has inactive parent
|
lsdsSkipped // was not executed
|
||||||
);
|
);
|
||||||
TLSDirectiveStates = set of TLSDirectiveState;
|
TLSDirectiveStates = set of TLSDirectiveState;
|
||||||
|
|
||||||
|
@ -5509,11 +5509,11 @@ begin
|
|||||||
until (ADirective^.SrcPos<>SrcPos) or (TCodeBuffer(ADirective^.Code)<>Code)
|
until (ADirective^.SrcPos<>SrcPos) or (TCodeBuffer(ADirective^.Code)<>Code)
|
||||||
or (i > Scanner.DirectiveCount);
|
or (i > Scanner.DirectiveCount);
|
||||||
dec(i);
|
dec(i);
|
||||||
if (ActiveCnt=1) and (InactiveCnt=0) and (SkippedCnt=0) then
|
if (ActiveCnt>0) and (InactiveCnt=0) and (SkippedCnt=0) then
|
||||||
SynState:=idnEnabled
|
SynState:=idnEnabled
|
||||||
else if (InactiveCnt=1) and (ActiveCnt=0) and (SkippedCnt=0) then
|
else if (ActiveCnt=0) and (InactiveCnt+SkippedCnt>0) then
|
||||||
SynState:=idnDisabled
|
SynState:=idnDisabled
|
||||||
else if (InactiveCnt>0) or (ActiveCnt>0) then
|
else if (ActiveCnt>0) then
|
||||||
SynState:=idnTempEnabled
|
SynState:=idnTempEnabled
|
||||||
else
|
else
|
||||||
SynState:=idnInvalid;
|
SynState:=idnInvalid;
|
||||||
|
Loading…
Reference in New Issue
Block a user