HighlightLanguage EditorColourSet::Apply(cbEditor* editor, HighlightLanguage lang) { if (!editor) return HL_NONE; if (lang == HL_AUTO) lang = GetLanguageForFilename(editor->GetFilename()); Apply(lang, editor->GetLeftSplitViewControl()); Apply(lang, editor->GetRightSplitViewControl()); return lang; }
HighlightLanguage EditorColourSet::Apply(cbEditor* editor, HighlightLanguage lang) { if (!editor) return HL_NONE; if (lang == HL_AUTO) lang = GetLanguageForFilename(editor->GetFilename()); const bool isC = ( Manager::Get()->GetConfigManager(wxT("editor"))->ReadBool(wxT("no_stl_in_c"), true) && lang == GetHighlightLanguage(wxT("C/C++")) && editor->GetFilename().Lower().EndsWith(wxT(".c")) ); Apply(lang, editor->GetLeftSplitViewControl(), isC); Apply(lang, editor->GetRightSplitViewControl(), isC); return lang; }