From c38d807c36821458e5fa774d9ec7c03acb92445f Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 12 Aug 2009 13:22:18 +0000 Subject: [PATCH] EditorOptions: more fixes to finding default color (non pas highlighter) git-svn-id: trunk@21192 - --- ide/editoroptions.pp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index 46c1b8e1a5..490deb0d81 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -2927,10 +2927,10 @@ begin if MappedAttriName = '' then for aha := Low(TAdditionalHilightAttribute) to High(TAdditionalHilightAttribute) do - if AnsiCompareText(GetAdditionalAttributeName(aha), AttriName) = 0 then - MappedAttriName := - AttriName// all special line color attributes can be mapped 1:1 - ; + if AnsiCompareText(GetAdditionalAttributeName(aha), AttriName) = 0 then begin + MappedAttriName := AttriName; // all special line color attributes can be mapped 1:1 + break; + end; if MappedAttriName <> '' then DefaultSyn := DefaultPascalSyn else @@ -2939,11 +2939,9 @@ begin j := DefaultSyn.AttrCount - 1; while (j >= 0) do begin - if AnsiCompareText(StrToValidXMLName(DefaultSyn.Attribute[j].Name), - MappedAttriName) = 0 then + if AnsiCompareText(DefaultSyn.Attribute[j].StoredName, MappedAttriName) = 0 then begin - CopyHiLightAttributeValues(DefaultSyn.Attribute[j], - Syn.Attribute[i]); + CopyHiLightAttributeValues(DefaultSyn.Attribute[j], Syn.Attribute[i]); break; end; dec(j);