diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2005-06-02 00:10:04 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2005-06-02 00:10:04 (GMT) |
commit | 76276177dea7d3e1412390e36a2c260f3f8107cb (patch) | |
tree | 531bed5a325b9fb7d9198eb09071f3d295b1cabd /Lib/curses | |
parent | d80ef02ec0e2445d34824bf908f93024a7079809 (diff) | |
download | cpython-76276177dea7d3e1412390e36a2c260f3f8107cb.zip cpython-76276177dea7d3e1412390e36a2c260f3f8107cb.tar.gz cpython-76276177dea7d3e1412390e36a2c260f3f8107cb.tar.bz2 |
[Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box
Diffstat (limited to 'Lib/curses')
-rw-r--r-- | Lib/curses/textpad.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/curses/textpad.py b/Lib/curses/textpad.py index 28d78dd..120c572 100644 --- a/Lib/curses/textpad.py +++ b/Lib/curses/textpad.py @@ -53,7 +53,7 @@ class Textbox: 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 |