From d4702f28d979ba68c15bfd3d32562b34c8f35f87 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 12 Jun 2009 16:06:48 +0000 Subject: [PATCH] SynEdit: Highlighter, limit default as key, only in classes git-svn-id: trunk@20605 - --- components/synedit/synhighlighterpas.pp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index ea0e74c6b3..a99c463b1b 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -1232,9 +1232,15 @@ end; function TSynPasSyn.Func69: TtkTokenKind; begin - if KeyComp('Default') then Result := tkKey else - if KeyComp('Dynamic') then Result := tkKey else - if KeyComp('Message') then Result := tkKey else Result := tkIdentifier; + if KeyComp('Default') then begin + if (TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]) then + Result := tkKey + else + Result := tkIdentifier; + end else + if KeyComp('Dynamic') then Result := tkKey + else + if KeyComp('Message') then Result := tkKey else Result := tkIdentifier; end; function TSynPasSyn.Func71: TtkTokenKind;