Menu

#1976 Rectangular Selection Box (Virtual Space) rendering wrong

Cosmetic
open
4
2017-10-20
2017-10-06
No

Rectangular Selection Box (enabled Virtual Space) rendering wrong in case of enabled brace matching,
please see attached screenshot.

2 Attachments

Discussion

  • Anonymous

    Anonymous - 2017-10-06

    (Windows 7 Prof. 64-bit)

     
  • Neil Hodgson

    Neil Hodgson - 2017-10-16

    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.

     
  • Neil Hodgson

    Neil Hodgson - 2017-10-16
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,2 @@
     RectSelBoxVirtSpace.jpg (47.2 kB; image/jpeg)
    +bug1976.patch (3.3 kB; application/octet-stream)
    
     
    • Anonymous

      Anonymous - 2017-10-17

      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:

      • Attachments has changed:

      Diff:

      --- old+++ new@@ -1 +1,2 @@
      RectSelBoxVirtSpace.jpg (47.2 kB; image/jpeg)+bug1976.patch (3.3 kB; application/octet-stream)


      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:

      Rectangular Selection Box (enabled Virtual Space) rendering wrong in case
      of enabled brace matching,
      please see attached screenshot.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/scintilla/bugs/1976/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Anonymous

        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...

        Regards,
        Rainer

         

        Last edit: Anonymous 2017-10-19
  • Anonymous

    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

     
  • Neil Hodgson

    Neil Hodgson - 2017-10-20
    • labels: --> scintilla, brace
    • assigned_to: Neil Hodgson
    • Priority: 5 --> 4
     
  • Neil Hodgson

    Neil Hodgson - 2017-10-20

    For now, I won't change the code but will leave this item open for others with similar issues.

     

Log in to post a comment.