[QScintilla] Resetting a lexer resets margin font?
Matic Kukovec
kukovecmatic at hotmail.com
Thu Apr 9 17:51:44 BST 2020
From: Phil Thompson <phil at riverbankcomputing.com>
Sent: Monday, April 6, 2020 12:45 PM
To: Matic Kukovec <kukovecmatic at hotmail.com>
Cc: QScintilla <qscintilla at riverbankcomputing.com>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20200409/f97c5d02/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oZcrj6yPLs.gif
Type: image/gif
Size: 20211 bytes
Desc: oZcrj6yPLs.gif
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20200409/f97c5d02/attachment-0001.gif>
More information about the QScintilla
mailing list