This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients primexx, rhettinger, terry.reedy
Date 2022-02-07.04:53:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644209607.88.0.107041372167.issue46666@roundup.psfhosted.org>
In-reply-to
Content
'│' is a bit taller that ascii bar '|'; hex(ord('│')) = '0x2502'.   It is a bit heavy.  In this Windows Firefox box it is slightly lighter than | but in IDLE with Source Code Pro, it is slightly darder.  Worse is being centered instead of on one edge.

We would have to check it with multiple fixed-ascii-pitch fonts on multiple systems before using any non-ascii char.  Does it always have the exact width of ascii ' ' or easier to check, ascii '|', so that is does not change the indent?   This is easily tested in the Settings dialog Font tab sample box.  Paste the following
│││││││││││││││
|||||||||||||||
It passes with all but one of the Windows mono fonts I tried.

I may ask a tk/tkinter question on SO about other possible options.  Testing this one in code:

if a:  # Put 1st bar on 4th space.
    if b:
   │    if c:
   │   │    pass
    if d:
   │    pass

if a: # Put 1st bar on 5th space.
    if b:
    │   if c:
    │   │   pass
    if d:
    │   pass

if a: # Put 1st bar on 1st space.
│   if b:
│   │   if c:
│   │   │   pass
│   if d:
│   │   pass

The 2nd option looks best to me.  The 3rd would be easier to program, as default tab indent would always be '│   '.  In any case, copied code would not be runnable code.  I would add this on the Option menu between Code Context and Line Numbers.

I believe only updating the markers on demand would be much easier to program than dynamically updating them with each keystroke (checking key and whether whitespace in indent area).

Before merging a PR (writen by someone else), someone other than me, such as Raymond, must test it in real use both for correctness, usefulness, and aesthetics.  (I anticipate that I would fail it on the latter two.)
History
Date User Action Args
2022-02-07 04:53:27terry.reedysetrecipients: + terry.reedy, rhettinger, primexx
2022-02-07 04:53:27terry.reedysetmessageid: <1644209607.88.0.107041372167.issue46666@roundup.psfhosted.org>
2022-02-07 04:53:27terry.reedylinkissue46666 messages
2022-02-07 04:53:27terry.reedycreate