wmove + wclrtobot is werase.
authorPierre Habouzit <madcoder@debian.org>
Thu, 8 Nov 2007 10:21:22 +0000 (11:21 +0100)
committerPierre Habouzit <madcoder@debian.org>
Thu, 8 Nov 2007 10:21:22 +0000 (11:21 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-ui/layout.c
lib-ui/menu.c
pager.c

index 5dfdb62..eb5c2f0 100644 (file)
@@ -84,7 +84,7 @@ void mutt_endwin(const char *msg)
 
 void ui_layout_init(void)
 {
 
 void ui_layout_init(void)
 {
-    clear();
+    erase();
     main_w = newwin(LINES - 1, COLS, 0, 0);
     SETCOLOR(main_w, MT_COLOR_NORMAL);
     mutt_error   = mutt_curses_error;
     main_w = newwin(LINES - 1, COLS, 0, 0);
     SETCOLOR(main_w, MT_COLOR_NORMAL);
     mutt_error   = mutt_curses_error;
index 7015ca1..873579e 100644 (file)
@@ -112,10 +112,7 @@ static void menu_pad_string (char *s, size_t n)
 void menu_redraw_full (MUTTMENU * menu)
 {
   SETCOLOR(main_w, MT_COLOR_NORMAL);
 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);
   SETCOLOR(main_w, MT_COLOR_SIDEBAR);
   mvwhline(main_w, LINES - 2, 0, ACS_HLINE, getmaxx(main_w));
   SETCOLOR(main_w, MT_COLOR_NORMAL);
diff --git a/pager.c b/pager.c
index 78887cc..24fe18a 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1275,9 +1275,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
 
     if (redraw & REDRAW_FULL) {
       SETCOLOR(main_w, MT_COLOR_NORMAL);
 
     if (redraw & REDRAW_FULL) {
       SETCOLOR(main_w, MT_COLOR_NORMAL);
-      /* wclear(main_w) doesn't optimize screen redraws */
-      wmove(main_w, 0, 0);
-      wclrtobot(main_w);
+      werase(main_w);
 
       if (IsHeader (extra) && Context->vcount + 1 < PagerIndexLines)
         indexlen = Context->vcount + 1;
 
       if (IsHeader (extra) && Context->vcount + 1 < PagerIndexLines)
         indexlen = Context->vcount + 1;