浏览代码

HackStudio: Show .h files with C++ syntax highlighting

Andreas Kling 5 年之前
父节点
当前提交
fe83d5087b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      DevTools/HackStudio/main.cpp

+ 1 - 1
DevTools/HackStudio/main.cpp

@@ -308,7 +308,7 @@ void open_file(const String& filename)
     auto file = g_project->get_file(filename);
     current_editor().set_document(const_cast<GTextDocument&>(file->document()));
 
-    if (filename.ends_with(".cpp")) {
+    if (filename.ends_with(".cpp") || filename.ends_with(".h")) {
         current_editor().on_change = [] { rehighlight(); };
         rehighlight();
     } else {