X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=commands.c;h=ca0efcc5922a0fdb982e06f654dade9031119790;hp=cde830db53ae209d8e32d810cc154f0749edf1f1;hb=8b89861e79d1b2e8ddcc54ea4d89957d6d10ebe6;hpb=125a7c903f7928f682cbea847f4436c9dd5b1b4d diff --git a/commands.c b/commands.c index cde830d..ca0efcc 100644 --- a/commands.c +++ b/commands.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -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))