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:
parent
afeabe603a
commit
de85deb48d
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue