Terry J. Reedy <tjre...@udel.edu> added the comment:

'│' 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.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46666>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to