From: Brett Parker <iDunno@sommitrealweird.co.uk>
Date: Mon, 20 Jul 2009 11:50:39 +0000 (+0100)
Subject: make it so that if the pad for the clues doesn't cover the whole rest of the screen... 
X-Git-Url: https://git.sommitrealweird.co.uk/curses-crossword.git/commitdiff_plain/c61629808c83c4c73ca8e060ce463c1907442cd0?ds=inline

make it so that if the pad for the clues doesn't cover the whole rest of the screen we only refresh/overlay the bit that counts
---

diff --git a/curses_crossword.py b/curses_crossword.py
index e2b5bb6..1576950 100755
--- a/curses_crossword.py
+++ b/curses_crossword.py
@@ -214,6 +214,8 @@ def crossword(stdscr, crossworddata):
     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