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

This commit is contained in:
Andreas Kling 2019-10-28 17:44:53 +01:00
parent 9131134704
commit fe83d5087b
Notes: sideshowbarker 2024-07-19 11:30:53 +09:00

View file

@ -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 {