]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Fix inability to switch cards after using home/end
[lightcards.git] / lightcards / display.py
index c9da9a95557aa133129319c3890ca45060e3f1ea..f31952ef206d06b46e32e21076fd34976450c7f1 100755 (executable)
@@ -31,7 +31,6 @@ def disp_bar(stdscr, stack, headers, obj):
 
 
 def disp_menu(stdscr, stack, headers, idx):
-    stdscr.clear()
     curses.init_pair(1, curses.COLOR_CYAN, 0)
     curses.init_pair(2, curses.COLOR_RED, 0)
     stdscr.addstr("Good job, you've completed a round!\n\n",
@@ -134,7 +133,9 @@ def get_key(stdscr, stack, headers, idx):
             disp_card(stdscr, stack, headers, idx)
         elif key in ["0", "^", "KEY_HOME"]:
             idx.setIdx(0)
+            idx.setSide(0)
             disp_card(stdscr, stack, headers, idx)
         elif key in ["$", "KEY_END"]:
             idx.setIdx(len(stack) - 1)
+            idx.setSide(0)
             disp_card(stdscr, stack, headers, idx)