From ceafb0bc536d3b6f1f2a803fa2a7c1a8b3f660ba Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 7 Nov 2009 15:12:57 +0000 Subject: [PATCH] synedit: limit 'sealed', 'final', 'abstract' highlighting to the sections where they are keywords git-svn-id: trunk@22479 - --- components/synedit/synhighlighterpas.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index abf764a5af..195ea962f7 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -1059,7 +1059,8 @@ function TSynPasSyn.Func42: TtkTokenKind; begin if KeyComp('Alias') then Result := tkKey - else if KeyComp('Final') then + else + if KeyComp('Final') and (TopPascalCodeFoldBlockType in [cfbtClassSection]) then Result := tkKey else Result := tkIdentifier; @@ -1082,7 +1083,7 @@ end; function TSynPasSyn.Func46: TtkTokenKind; begin - if KeyComp('Sealed') then + if KeyComp('Sealed') and (TopPascalCodeFoldBlockType in [cfbtClass]) then Result := tkKey else Result := tkIdentifier; @@ -1345,7 +1346,7 @@ end; function TSynPasSyn.Func84: TtkTokenKind; begin - if KeyComp('Abstract') then + if KeyComp('Abstract') and (TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]) then Result := tkKey else Result := tkIdentifier;