[Python-checkins] python/dist/src/Lib/curses textpad.py,1.11,1.12

akuchling@users.sourceforge.net akuchling at users.sourceforge.net
Thu Jun 2 02:10:07 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/curses
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18874/Lib/curses

Modified Files:
	textpad.py 
Log Message:
[Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box

Index: textpad.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/curses/textpad.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- textpad.py	19 Oct 2004 19:36:09 -0000	1.11
+++ textpad.py	2 Jun 2005 00:10:04 -0000	1.12
@@ -53,7 +53,7 @@
         last = self.maxx
         while 1:
             if ascii.ascii(self.win.inch(y, last)) != ascii.SP:
-                last = last + 1
+                last = min(self.maxx, last+1)
                 break
             elif last == 0:
                 break



More information about the Python-checkins mailing list