Skip to content

Commit df07239

Browse files
committed
Avoid crashing on terminal resize (on OS X)
This fixes issue #65. The problem usually presents itself when the terminal is resized quickly.
1 parent 7011ccc commit df07239

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,10 @@ def do_resize(caller):
17731773
curses.doupdate()
17741774
DO_RESIZE = False
17751775

1776-
caller.resize()
1776+
try:
1777+
caller.resize()
1778+
except curses.error:
1779+
pass
17771780
# The list win resizes itself every time it appears so no need to do it here.
17781781

17791782

0 commit comments

Comments
 (0)