Fix input_box refresh() out of order resize
authorJack Miller <jack@codezen.org>
Wed, 28 Jun 2017 05:29:21 +0000 (00:29 -0500)
committerJack Miller <jack@codezen.org>
Wed, 28 Jun 2017 06:16:12 +0000 (01:16 -0500)
commit30dc8f784140fd01017285eb244dcb1a851b4257
tree27dab5efbf3490840f07ef9c4504584d82c57538
parent1bf07985df951df51a6589a453fc492e23498144
Fix input_box refresh() out of order resize

Because readline is in charge of calling redisplay, and appears to call
redisplay on resize, and redisplay call input_box.refresh, which is
racing with potentially initing a new input_box, so if the input box's
init() hasn't been called yet, don't do anything.

Fixes exceptions when resizing frequently with a prompt open.
canto_curses/input.py
canto_curses/screen.py