Do not set the lexer for the map wxSTC instance

Apparently using the same lexer for 2 controls sharing the same document
doesn't work, this results in problems with syntax highlighting and
folding not working at all.

Simply not doing this fixes these problems while still showing the
correct syntax highlighting in the map, as it shares the same document.
This commit is contained in:
Vadim Zeitlin
2025-09-01 17:25:03 +02:00
parent 08b041c123
commit df2f85d0b7
+5 -1
View File
@@ -915,7 +915,11 @@ public:
edit->SetReadOnly(wasReadOnly);
// Copy the main editor attributes.
SetLexer(edit->GetLexer());
// Do NOT set the lexer: this somehow breaks syntax highlighting and
// folding in the main editor itself and the map gets syntax
// highlighting even without it anyhow.
for ( int style = 0; style < wxSTC_STYLE_MAX; ++style )
{
// There is probably no need to set the font for the map: at such