This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: curses should reset curses.{COLS,LINES} when term. resized
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, doko, machamalahalaba, scott.dial
Priority: low Keywords:

Created on 2007-01-11 23:38 by doko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
diff.txt doerwalter, 2007-02-12 18:59
Messages (6)
msg30974 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-01-11 23:38
[forwarded from http://bugs.debian.org/366698]

The curses module does not reset curses.COLS and curses.LINES when the terminal is resized.
msg30975 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-02-12 18:59
Here's a patch that implements the requested changes.
File Added: diff.txt
msg30976 - (view) Author: Scott Dial (scott.dial) Date: 2007-03-05 22:14
I've reviewed this patch and I believe it to be the correct patch. I believe it would be prudent to add a test case for this. I'm unable to attach, but here is a link to a patch for that: http://scottdial.com/python-dev/curses-test.patch
msg30977 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-03-06 20:47
Checked in as revision 54180 and 54181 (2.5)
msg30978 - (view) Author: blubb (machamalahalaba) Date: 2007-05-12 16:17
I'm still able to reproduce this bug with Python 2.5.1. The following script always gives the same size:

import curses

while True:
	scr = curses.initscr()
	print curses.LINES, curses.COLS
	scr.getch()
	scr.getch()
	curses.endwin()
msg30979 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2007-05-13 08:07
Updating LINES and COLS is done in curses.resize_term() and curses.resizeterm(), so you have to call one of those functions.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44442
2007-01-11 23:38:27dokocreate