[issue28840] IDLE not handling long lines correctly

2016-11-30 Thread piotr.sk

New submission from piotr.sk:

IDLE included in Python 3.5.2 does not display correctly files with very long 
lines under Windows 7.

Attached example file does not show the third line correctly in Windows 7. 
These lines are part of a script that attempts to parse the messages.
Even though very long lines are not according to Python convention, they should 
be displayed correctly in the editor. 
If Notepad does it correctly, I would assume IDLE can handle long lines too ;-)

--
assignee: terry.reedy
components: IDLE
files: test.py
messages: 282082
nosy: piotr.sk, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE not handling long lines correctly
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file45705/test.py

___
Python tracker 
<http://bugs.python.org/issue28840>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28840] IDLE not handling long lines correctly

2016-12-01 Thread piotr.sk

piotr.sk added the comment:

Thank you for explanation of the background problem. Updating documentation as 
you mention is a good next step.

Thanks as well for the proposed solution of splitting the input string, but as 
long as it is just a display issue, this is not needed for test strings. 

On the other side, given tkinter limitations of displaying lines longer than 
2728 characters, I propose following solution for IDLE:
If line to display is longer than 2728 characters (or whatever limit you set, 
let’s call it X), by default replace it with a line of X-3 initial characters 
followed by ”...” (internally, just for displaying purposes ;-)). As long as 
the current cursor position is not beyond X-3 column (99.99% of time working 
with the script), display the truncated line.  

This will avoid confusion, as users will not see “empty”/”strange” lines 
browsing through the code and if someone really wants to manually edit 
character after the X-3 column, the display will be adapted accordingly.

Let me know what you think about it.

--

___
Python tracker 
<http://bugs.python.org/issue28840>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com