~callum/barszcz

8249b149223ebf0b8fa459caaadbd478babda4be — Callum Brown 1 year, 10 months ago 1a779ac
Fix crash when writing long returns to input_win

Fixes: https://todo.sr.ht/~callum/barszcz/23
1 files changed, 7 insertions(+), 1 deletions(-)

M beetsplug/barszcz.py
M beetsplug/barszcz.py => beetsplug/barszcz.py +7 -1
@@ 572,7 572,13 @@ class Barszcz:
                    input_win.clear()
                    # Display return value
                    if isinstance(result, str):
                        input_win.addstr(0, 0, result)
                        # Curses throws error when writing to bottom right
                        try:
                            input_win.addstr(
                                0, 0, shorten(result, input_win.getmaxyx()[1])
                            )
                        except curses.error:
                            pass
                input_win.refresh()

            elif key == "KEY_RESIZE":