Fix crash due to terminal overflow

The program will now scroll the screen when outputting intermediate
solutions without sufficient space, rather than crashing.
This commit is contained in:
Jeremy Saklad 2021-06-19 08:02:07 -05:00
parent afeabe603a
commit de85deb48d
Signed by: Jeremy Saklad
GPG Key ID: 9CA2149583EDBF84
1 changed files with 2 additions and 0 deletions

View File

@ -2278,6 +2278,8 @@ def main():
if not args.verbose:
def WrappedSolve(stdscr, arguments):
# Prevents crash if window is too small to fit text
stdscr.scrollok(True)
# Move stdscr to last position
return Solve(*arguments, stdscr)
print(curses.wrapper(WrappedSolve, arguments))