Skip to content

Commit

Permalink
Hopefully fix syntax highlighting with wx 3.0.x
Browse files Browse the repository at this point in the history
I'm pretty sure this is the reason it stopped working at least (the second parameter in StartStyling is *supposed* to be ignored in wx3.0, but apparently not)
  • Loading branch information
sirjuddington committed Mar 3, 2020
1 parent e435905 commit 44bf0e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TextEditor/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ void Lexer::doStyling(TextEditorCtrl* editor, int start, int end)
editor
};

editor->StartStyling(start, 0);
#if wxMAJOR_VERSION < 3 || (wxMAJOR_VERSION == 3 && wxMINOR_VERSION < 1) \
|| (wxMAJOR_VERSION == 3 && wxMINOR_VERSION == 1 && wxRELEASE_NUMBER == 0)
editor->StartStyling(start, 31);
#else
editor->StartStyling(start);
#endif

if (debug_lexer)
Log::debug(S_FMT("START STYLING FROM %d TO %d (LINE %d)", start, end, line + 1));

Expand Down

0 comments on commit 44bf0e2

Please sign in to comment.