[QScintilla] Resetting a lexer resets margin font?

Phil Thompson phil at riverbankcomputing.com
Mon Apr 6 11:45:28 BST 2020


On 29/03/2020 21:11, Matic Kukovec wrote:
> Hi guys,
> 
> In the example in the attachment (lexer_change.py) when reseting the
> lexer of the QSciScintilla editor
> by pressing the button RESET LEXER on the top, the margin font gets
> reset to the default and brace matching
> becomes weird (the braces move to the left when the cursor is on a 
> brace-pair).
> 
> In the attached example this happens always, but I have code where
> this does not happen, but the code is more or less the same.
> Am I missing something or is this a bug?
> 
> Specs:
> Windows 10
> PyQt 5.14.0 or PyQt 5.14.1
> QScintilla 2.11.4

When a new lexer is set a lot of (apparently lexer-independent) state 
gets reset. This is a feature of the underlying Scintilla 
implementation.

Phil


More information about the QScintilla mailing list