]> git.sommitrealweird.co.uk Git - curses-crossword.git/commitdiff
make it so that if the pad for the clues doesn't cover the whole rest of the screen...
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 20 Jul 2009 11:50:39 +0000 (12:50 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Mon, 20 Jul 2009 11:50:39 +0000 (12:50 +0100)
curses_crossword.py

index e2b5bb63ba0c99cf66b747d2d11486cdeb86a6b9..1576950059885a0261eeac8cf3bef82e35a5cedb 100755 (executable)
@@ -214,6 +214,8 @@ def crossword(stdscr, crossworddata):
     padtly = cury
 
     (padbry, padbrx) = stdscr.getmaxyx()
     padtly = cury
 
     (padbry, padbrx) = stdscr.getmaxyx()
+    if padbry > cluespad.getmaxyx()[0] + padtly:
+        padbry = cluespad.getmaxyx()[0] + padtly
     cury = 0
     cluespad.addstr(cury, curx, "Across")
     cury += 1
     cury = 0
     cluespad.addstr(cury, curx, "Across")
     cury += 1