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

akuchling@users.sourceforge.net akuchling at users.sourceforge.net
Thu Jun 2 02:11:57 CEST 2005


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

Modified Files:
      Tag: release24-maint
	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.11.2.1
diff -u -d -r1.11 -r1.11.2.1
--- textpad.py	19 Oct 2004 19:36:09 -0000	1.11
+++ textpad.py	2 Jun 2005 00:11:55 -0000	1.11.2.1
@@ -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