highighting fixed
authorJohn Ladan <jladan@uwaterloo.ca>
Sat, 10 Mar 2012 05:51:38 +0000 (00:51 -0500)
committerJohn Ladan <jladan@uwaterloo.ca>
Sat, 10 Mar 2012 05:51:38 +0000 (00:51 -0500)
cursestest.py

index a1e9592..51d161e 100755 (executable)
@@ -37,6 +37,8 @@ def menutest(w, l):
         i+=1
 
     highlight=0
+    w.chgat(highlight,0, cols, curses.A_REVERSE)
+    w.refresh()
     ch=w.getch()
     while (ch!=113): # leave on q
         if ch==curses.KEY_UP:
@@ -46,9 +48,9 @@ def menutest(w, l):
                 w.chgat(highlight,0, cols, curses.A_REVERSE)
         if ch==curses.KEY_DOWN:
             if highlight!=len(l)-1:
-                w.chgat(highlight,0, 16, 0)
+                w.chgat(highlight,0, cols, 0)
                 highlight += 1
-                w.chgat(highlight,0, 16, curses.A_REVERSE)
+                w.chgat(highlight,0, cols, curses.A_REVERSE)
         w.refresh()
         ch = w.getch()