diff --git a/src/TextEditor/Lexer.cpp b/src/TextEditor/Lexer.cpp index 762daf3fa..b23faac55 100644 --- a/src/TextEditor/Lexer.cpp +++ b/src/TextEditor/Lexer.cpp @@ -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));