Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7b1136

Browse files
abadgerlisroach
authored andcommitted
Document a workaround for a curses bug (GH-13209)
1 parent 51a860e commit e7b1136

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

Doc/library/curses.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,16 @@ the following methods and attributes:
708708

709709
.. note::
710710

711-
Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
712-
Attempting to write to the lower right corner of a window, subwindow,
713-
or pad will cause an exception to be raised after the string is printed.
711+
* Writing outside the window, subwindow, or pad raises :exc:`curses.error`.
712+
Attempting to write to the lower right corner of a window, subwindow,
713+
or pad will cause an exception to be raised after the string is printed.
714+
715+
* A `bug in ncurses <https://bugs.python.org/issue35924>`_, the backend
716+
for this Python module, can cause SegFaults when resizing windows. This
717+
is fixed in ncurses-6.1-20190511. If you are stuck with an earlier
718+
ncurses, you can avoid triggering this if you do not call :func:`addstr`
719+
with a *str* that has embedded newlines. Instead, call :func:`addstr`
720+
separately for each line.
714721

715722

716723
.. method:: window.attroff(attr)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add a note to the ``curses.addstr()`` documentation to warn that multiline
2+
strings can cause segfaults because of an ncurses bug.

0 commit comments

Comments
 (0)