Move the rest of mutt "things" into a window as well.
[apps/madmutt.git] / commands.c
index 3870aa8..ca0efcc 100644 (file)
@@ -209,9 +209,10 @@ void ci_bounce_message (HEADER * h, int *redraw)
             buf);
 
 #define extra_space (15 + 7 + 2)
-  if (m_strwidth(prompt) > COLS - extra_space) {
-    mutt_format_string(prompt, sizeof(prompt), 0, COLS - extra_space, 0, 0,
-                       prompt, sizeof(prompt), 0);
+  if (m_strwidth(prompt) > getmaxx(main_w) - extra_space) {
+    mutt_format_string(prompt, sizeof(prompt), 0,
+                       getmaxx(main_w) - extra_space, 0, 0, prompt,
+                       sizeof(prompt), 0);
     m_strcat(prompt, sizeof(prompt), "...?");
   } else {
     m_strcat(prompt, sizeof(prompt), "?");
@@ -220,12 +221,12 @@ void ci_bounce_message (HEADER * h, int *redraw)
 
   if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) {
     address_list_wipe(&adr);
-    CLEARLINE (LINES - 1);
+    CLEARLINE(main_w, LINES - 1);
     mutt_message (h ? _("Message not bounced.") : _("Messages not bounced."));
     return;
   }
 
-  CLEARLINE (LINES - 1);
+  CLEARLINE(main_w, LINES - 1);
 
   rc = mutt_bounce_message (NULL, h, adr);
   address_list_wipe(&adr);
@@ -464,7 +465,7 @@ void mutt_shell_escape (void)
     if (!buf[0])
       m_strcpy(buf, sizeof(buf), mod_core.shell);
     if (buf[0]) {
-      CLEARLINE (LINES - 1);
+      CLEARLINE(main_w, LINES - 1);
       mutt_endwin (NULL);
       fflush (stdout);
       if (mutt_system (buf) != 0 || option (OPTWAITKEY))