mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-22 06:05:36 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user