Bugs item #1152762, was opened at 2005-02-27 19:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1152762&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: John McPherson (jrm21)
Assigned to: Nobody/Anonymous (nobody)
Summary: curses.textpad raises error
Initial Comment:
textpad seems to have a bug when you backspace from the
start of a line. By default, stripspaces is on, so it
tries to skip any spaces on the previous line. But if
there are no spaces, it raises a curses error and makes
the app quit.
Reproduce by:
$ python /usr/lib/python2.3/curses/textpad.py
type "1234567890" into the textpad
press backspace twice.
The problem is _end_of_line() function doing "last =
last + 1"
I think a better way would be to start at the end of
the line (last=self.maxx), and skip backwards while
"last" is a space:
while last > 0 and ascii.ascii(self.win.inch(y,
last)) == ascii.SP:
last -= 1
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1152762&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com