To avoid issues like this, brace matching should use the same font as the brace would use when not matched. The best way is to use indicators through the SCI_BRACEHIGHLIGHTINDICATOR API.
Having different width matched braces causes many issues and I'm unsure whether it is helpful to fix these issues since the fixes may cause even more problems.
Ths case is caused by multiple sections of code, including the sequence of actions - the selection occurs and then the application decides to set the brace highlight. Repeating the selection calculation after the brace match highlight could lead to other visual effects or even cyclic flashing.
Attached is a patch that may fix this issue but it may lead to further problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Status: open Group: Cosmetic Created: Fri Oct 06, 2017 10:31 AM UTC by Rainer Peter Kottenhoff Last Updated: Mon Oct 16, 2017 10:44 PM UTC Owner: nobody Attachments:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2017-10-19
Hello Neil,
i just want to report an intermediate result:
the patch you provided, reduces the problem a lot - it is not gone completely
(maybe braces changed font (bold) effect).
I didn't encounter possible other side-effects of this patch, nor tested
this thoroughly.
...
going now to refactor code towards the SCI_BRACEHIGHLIGHTINDICATOR API...
(Windows 7 Prof. 64-bit)
To avoid issues like this, brace matching should use the same font as the brace would use when not matched. The best way is to use indicators through the SCI_BRACEHIGHLIGHTINDICATOR API.
Having different width matched braces causes many issues and I'm unsure whether it is helpful to fix these issues since the fixes may cause even more problems.
Ths case is caused by multiple sections of code, including the sequence of actions - the selection occurs and then the application decides to set the brace highlight. Repeating the selection calculation after the brace match highlight could lead to other visual effects or even cyclic flashing.
Attached is a patch that may fix this issue but it may lead to further problems.
Diff:
Hello Neil,
I will try the patch and play around a little bit.
My preference will be: code refactoring towards using the
SCI_BRACEHIGHLIGHTINDICATOR
API.
Thank you very much for your respond.
Best regards,
Rainer
2017-10-17 0:45 GMT+02:00 Neil Hodgson nyamatongwe@users.sf.net:
Hello Neil,
i just want to report an intermediate result:
the patch you provided, reduces the problem a lot - it is not gone completely
(maybe braces changed font (bold) effect).
I didn't encounter possible other side-effects of this patch, nor tested
this thoroughly.
...
going now to refactor code towards the SCI_BRACEHIGHLIGHTINDICATOR API...
Regards,
Rainer
Last edit: Anonymous 2017-10-19
... finally i reverted the patch and implemented the usage of proposed SCI_BRACEHIGHLIGHTINDICATOR API. It workes fine now.
Thank you very much
For now, I won't change the code but will leave this item open for others with similar issues.