From: Phil Thompson <[email protected]> Sent: Monday, April 6, 2020 12:45 PM To: Matic Kukovec <[email protected]> Cc: QScintilla <[email protected]> Subject: Re: [QScintilla] Resetting a lexer resets margin font?
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 Thank you Phil, I did not know that. The problem is not restyling the margin font after this happens, it's the brace matching that I don't know how to reset back to the normal style? This is what happens: [cid:d60c6c80-379f-4205-9d39-f7c799947769] How do I switch the brace style back to the first one in the above animation? The first one is the slightly thicker braces, before the button press. Thanks, Matic
_______________________________________________ QScintilla mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/qscintilla
