-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Closed as not planned
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import curses
def main(stdscr):
stdscr.clear()
# height, width = stdscr.getmaxyx()
height, width = curses.LINES, curses.COLS
win = curses.newwin(height, width, 0, 0)
win.addstr(0, 0, '+')
win.addstr(0, width - 1, '+') # width - 1: no error
# win.addstr(height - 1, width - 2, '+') # width - 2: no error
win.addstr(height - 1, width - 1, '+') # width - 1: error
# win.addch(height - 1, width - 1, '+') # width - 1: error
win.addstr(height - 1, 0, '+')
win.touchwin()
win.refresh()
win.getch()
if __name__ == '__main__':
curses.update_lines_cols()
curses.wrapper(main)
Traceback (most recent call last):
File "/.../demo.py", line 20, in <module>
curses.wrapper(main)
~~~~~~~~~~~~~~^^^^^^
File "/.../3.13.2/lib/python3.13/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/.../demo.py", line 11, in main
win.addstr(height - 1, width - 1, '+') # width - 1: error
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_curses.error: addwstr() returned ERR
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done