Terry J. Reedy added the comment:

I believe the line number behavior Ned describes is the same as the Code 
Context behavior.  I just tested the latter to verify Saimadhav's email report. 
I think both *should* be the same.

The docs say Code Context is a toggle. However, it does not mention the 
checkmark or the initial state of new windows. Clicking Code Context toggles 
the state of the current window only; I think this is proper. I also want that 
for line-numbering.

It also toggles the initial state of future windows, as indicated by the 
checkmark.  In other words, the checkmark does NOT indicate the state of the 
current window, which is visually obvious anyway.  Instead, it indicates the 
initial state of new windows, and it the latter that is saved across sessions.  
This behavior may not be expected, but given the alternatives*, I consider it 
plausible if not designed. It definitely needs to be documented. 

* So what are the alternatives?

1. Make the checkmark toggle local to the window, as you expected. But then 
what would be the initial state of new windows (and saved as such)?  One 
solution would be two Code Context options, one for current window (checkmark 
not really needed) and another for future windows (saved). The current design 
cleverly combines two buttons into one. Perhaps it is too clever, but I don't 
like two buttons either. Another solution would be to just use whatever is in 
config default+user. This would be more palatable once we add a 
config-extension dialog. But it would still be more of a nuisance than the 
current within-session switching.

2. Make the window toggle global to all current windows.  I suspect that this 
would be visually obnoxious.  If someone hated Context/Numbering and only 
turned either on temporarily, intended for one window, out of necessity, it 
would be behaviorally obnoxious.  There may also have been a performance 
consideration that is somewhat but not totally obsolete.

The feature was added in #936169 in 2005. AFAIK, there have been no complaints. 
There are none I could find on the tracker. So my inclination is to commit Line 
Numbering with the same menu behavior as Code Context.  If we ever want to 
change (both), that should be a new issue and discussion.  Tal, you were 
involved in #936169. Any comments?

----------

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

Reply via email to