There's a problem with scintilla control. When I switch between languages (js and mssql for example), using
this.scintilla1.ConfigurationManager.Language = "js"; //or = "mssql"
code line, syntax highlighting of text in the control gets broken (colors of highlighting are wrong and folding remains unchanged from previous language).
Looks like it is a bug of the scintilla control.
If I type any character in the document after this, the highlighting is fixed in all the document below the position where the character was typed.
Taking this into account, could anyone prompt me any workarounds for this bug? Maybe sending some messages directly to control after language switching or something like this. Or maybe it can be avoided with just adjusting some settings of the control.
Thanks a lot for any advice. I can send a test project and some screenshots of the bug reproducing if it helps.