After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755933 - C++ Headerfiles (*.hpp) are not recognized as such
C++ Headerfiles (*.hpp) are not recognized as such
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-01 11:04 UTC by Kevin
Modified: 2015-10-01 17:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kevin 2015-10-01 11:04:45 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
Comment 1 Sébastien Wilmet 2015-10-01 16:11:53 UTC
I confirm this bug, thanks for reporting it.
Comment 2 Sébastien Wilmet 2015-10-01 16:24:33 UTC
commit c185fa5 fixes this bug.

But there is maybe another bug, because normally the glob *.hpp should have worked.
Comment 3 Sébastien Wilmet 2015-10-01 17:23:17 UTC
Indeed, there is a bug in gtk_source_language_manager_guess_language(), I've filed bug #755952.