GNOME Bugzilla – Bug 755933
C++ Headerfiles (*.hpp) are not recognized as such
Last modified: 2015-10-01 17:23:17 UTC
When trying to open a C++ headerfile with gedit, the C syntax highlighting is selected instead of the C++ Header highlighting. Example: $ echo "// Test Class\nclass Test { public: int member; };" >> test.hpp $ gedit test.hpp => gedit will not highlight the `class` keyword On the other hand, if I save as a *.cpp file: $ echo "// Test Class\nclass Test { public: int member; };" >> test.cpp $ gedit test.cpp => gedit does highlight the `class` keyword I'm using gedit 3.18.0 on Fedora 23 and I have manually applied commit 107bd6e to my local `/usr/share/gtksourceview-3.0/language-specs/cpphdr.lang`. This is my first bug report for a gnome product, so if there is anything missing, feel free to ask! [0]: https://git.gnome.org/browse/gtksourceview/commit/?id=107bd6e
I confirm this bug, thanks for reporting it.
commit c185fa5 fixes this bug. But there is maybe another bug, because normally the glob *.hpp should have worked.
Indeed, there is a bug in gtk_source_language_manager_guess_language(), I've filed bug #755952.