WHAT_KEY has better equivalents in other tools.
[apps/madmutt.git] / lib-ui / menu.c
index 4c2bf1e..d0b8c54 100644 (file)
@@ -16,7 +16,6 @@
 #include "charset.h"
 
 #include <imap/imap.h>
-#include <lib-ui/sidebar.h>
 
 extern size_t UngetCount;
 
@@ -112,10 +111,7 @@ static void menu_pad_string (char *s, size_t n)
 void menu_redraw_full (MUTTMENU * menu)
 {
   SETCOLOR(main_w, MT_COLOR_NORMAL);
-  /* wclear() doesn't optimize screen redraws */
-  wmove (main_w, 0, 0);
-  wclrtobot (main_w);
-
+  werase(main_w);
   SETCOLOR(main_w, MT_COLOR_SIDEBAR);
   mvwhline(main_w, LINES - 2, 0, ACS_HLINE, getmaxx(main_w));
   SETCOLOR(main_w, MT_COLOR_NORMAL);
@@ -239,9 +235,9 @@ static void menu_redraw_prompt (MUTTMENU * menu)
     if (*Errorbuf)
       mutt_clear_error ();
 
-    SETCOLOR(main_w, MT_COLOR_NORMAL);
-    mvwaddstr (main_w, LINES - 1, 0, menu->prompt);
-    wclrtoeol (main_w);
+    SETCOLOR(stdscr, MT_COLOR_NORMAL);
+    mvwaddstr(stdscr, LINES - 1, 0, menu->prompt);
+    wclrtoeol(stdscr);
   }
 }
 
@@ -682,11 +678,11 @@ int mutt_menuLoop (MUTTMENU * menu)
     i = km_dokey (menu->menu);
     if (i == OP_TAG_PREFIX || i == OP_TAG_PREFIX_COND) {
       if (menu->tagged) {
-        mvwaddstr (main_w, LINES - 1, 0, "Tag-");
-        wclrtoeol (main_w);
+        mvwaddstr(stdscr, LINES - 1, 0, "Tag-");
+        wclrtoeol(stdscr);
         i = km_dokey (menu->menu);
         menu->tagprefix = 1;
-        CLEARLINE(main_w, LINES - 1);
+        CLEARLINE(stdscr, LINES - 1);
       }
       else if (i == OP_TAG_PREFIX) {
         mutt_error _("No tagged entries.");
@@ -841,10 +837,6 @@ int mutt_menuLoop (MUTTMENU * menu)
       MAYBE_REDRAW (menu->redraw);
       break;
 
-    case OP_WHAT_KEY:
-      mutt_what_key ();
-      break;
-
     case OP_REDRAW:
       clearok (main_w, TRUE);
       menu->redraw = REDRAW_FULL;