diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 3c4c3ce95b..799328d787 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -5459,7 +5459,7 @@ begin begin aDirective:=Scanner.DirectivesSorted[i]; if TCodeBuffer(aDirective^.Code)<>Code then continue; - if not (aDirective^.Kind in (lsdkAllIf+[lsdkElIfC])) then continue; + if not (aDirective^.Kind in (lsdkAllIf+[lsdkElIfC,lsdkElseIf])) then continue; Code.AbsoluteToLineCol(aDirective^.SrcPos,Y,X); if Y<1 then continue; SynState:=idnInvalid;