From 629410b3d6ed91e3c6764e5d30b9278247f69083 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 17 Jul 2020 21:57:02 -0400 Subject: [PATCH] TextEditor: Auto-select C++ syntax highlighting for more extensions --- Applications/TextEditor/TextEditorWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp index 6407117344..ed4e4c26f1 100644 --- a/Applications/TextEditor/TextEditorWidget.cpp +++ b/Applications/TextEditor/TextEditorWidget.cpp @@ -483,7 +483,8 @@ void TextEditorWidget::set_path(const LexicalPath& lexical_path) m_name = lexical_path.title(); m_extension = lexical_path.extension(); - if (m_extension == "cpp" || m_extension == "h") { + if (m_extension == "c" || m_extension == "cc" || m_extension == "cxx" || + m_extension == "cpp" || m_extension == "h") { m_cpp_highlight->activate(); } else if (m_extension == "js" || m_extension == "json") { m_js_highlight->activate();