diff --git a/src/highlighters.cc b/src/highlighters.cc index f44c40a0..cfb887cf 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -652,11 +652,19 @@ HighlighterAndId reference_factory(HighlighterParameters params) const String& name = params[0]; // throw if not found - DefinedHighlighters::instance().get_group(name, '/'); + //DefinedHighlighters::instance().get_group(name, '/'); return HighlighterAndId(name, [name](const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer) - { DefinedHighlighters::instance().get_group(name, '/')(context, flags, display_buffer); }); + { + try + { + DefinedHighlighters::instance().get_group(name, '/')(context, flags, display_buffer); + } + catch (group_not_found&) + { + } + }); } template