Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#34 inconsistend syntax highlighting

closed-invalid
Interface (176)
5
2006-11-10
2006-11-10
Hans-Peter
No

when writing c++ code, geany 0.9 will use different coloring for certain keywords in the .h and the .cc files (tested with "namespace" and "throw")
Example:

...
namespace whatever {
...

will have a blue color in the .cc file and no coloring in the header file. Seems that c++ only keywords are not regognized in header files.

Possible solution: always highlight C++ keywords

Discussion

  • Enrico Tröger
    Enrico Tröger
    2006-11-10

    Logged In: YES
    user_id=1117045

    It's not a bug but a feature ;-).

    Geany can't know when opening a .h file if it is a C oder
    C++ header file. So it opens the file by default as a C
    header file. Namespace and throw are not defined in C, so
    they won't be highlighted.

    There are two possible solutions for you:
    a) set the filetype manually to C++
    b) use hpp, h++, hh or hxx as file extension then Geany
    detects it correctly as a C++ header file.

     
  • Enrico Tröger
    Enrico Tröger
    2006-11-10

    • assigned_to: nobody --> eht16
    • status: open --> closed-invalid