wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Code display doesn't display keywords correctly in #ifdef/#endif sections

Open KeyWorksRW opened this issue 4 years ago • 3 comments

Description:

I'm not sure if there's anything we can do about this, but it is at least worth investigating. The keyword color change is not working in the first part of a conditional section. For example:

#if defined(_WIN32)
#include <wx/generic/stattextg.h>
#endif

Normally, the entire #include line is displayed in *wxBLUE -- but in the above example, the #if and #endif lines are in blue, but the #include line is displayed normally.

This is also breaking in code generation:

    #if defined(_WIN32)
    m_staticText = new wxGenericStaticText(this, wxID_ANY, wxEmptyString);
    #else
    m_staticText = new wxStaticText(this, wxID_ANY, wxEmptyString);
    #endif

wxGenericStaticText is set as a keyword, so it should be displayed in *wxBLUE but is displayed normally. wxStaticText is also set as a keyword, and it is being displayed correctly in *wxBLUE.

KeyWorksRW avatar Jan 22 '22 14:01 KeyWorksRW

Adding this to the 1.1 milestone because we need to check this with the newer version of scintilla that's part of wxWidgets 3.3. I don't think we can release with wxWidgets 3.3 unless wxSnapshot is updated, but we do need to be certain that nothing in the updated scintilla is going to break or cause problems with all of our code generation panels.

KeyWorksRW avatar Nov 16 '22 15:11 KeyWorksRW

Moving to 1.1.x milestone -- I don't want to hold up the 1.1 release for this.

KeyWorksRW avatar Feb 08 '23 17:02 KeyWorksRW

Scintilla decides how keywords get colored, so this is likely to prove very difficult to fix, short of coloring the keywords ourselves.

KeyWorksRW avatar Nov 03 '23 12:11 KeyWorksRW