Skip to content

Editor gets angry with C++ in Header files. #2961

@CarlBeniz

Description

@CarlBeniz

I have been using version 2.0.10 to write C++ for about a year and noticed that the syntax highlighting for the headerfiles (*.h) was off, but didn't mind too much. Recently, I noticed that this version of the editor seems to default to Objective-C for header files, so I set it to C++, which fixed the highlighting, but instead started complaining about the code when saving the document. Since this code was legal and compiled without any warnings or notes from the compiler (g++ of GCC), I assumed it was a bug and updated the editor to 2.0.12.
Now, the editor not only gets angry when filetype is set to 'c++', but saving with the default/assumed filetype (which is 'c' with this version) also makes it complain. This did not happen previously.

2.0.10: If default is Objective-C, it does not get angry when saving, but if set explicitly it would be. If default is C, it would be.
2.0.12: The default is now C, and it gets angry by default.

When filetype is set to 'c++', which is what I want to do, commenting out and moving code makes it upset with different things, and it will even remember the line it used to get angry with, even if the code is removed and the file is saved.
micro_cpp_h_issue_001

This is only an issue with C++ code in *.h-files, *.cpp-files do not upset the editor.

Commit hash: c2cebaa
OS: Zorin OS 16.1
Terminal: GNOME Terminal 3.36.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions