From 62660b191284bee3b9bc3eeb126f7632636af535 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 8 Nov 2007 11:04:11 +0100 Subject: [PATCH] Useless CLEARLINE(stdscr, LINES - 1) Signed-off-by: Pierre Habouzit --- commands.c | 4 ---- compose.c | 1 - flags.c | 5 +---- init.c | 10 ++-------- lib-ui/curs_lib.c | 1 + muttlib.c | 2 -- recvattach.c | 6 ++---- recvcmd.c | 3 --- 8 files changed, 6 insertions(+), 26 deletions(-) diff --git a/commands.c b/commands.c index 7dcb21b..eb7c6df 100644 --- a/commands.c +++ b/commands.c @@ -220,13 +220,10 @@ void ci_bounce_message (HEADER * h, int *redraw) if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) { address_list_wipe(&adr); - CLEARLINE(stdscr, LINES - 1); mutt_message (h ? _("Message not bounced.") : _("Messages not bounced.")); return; } - CLEARLINE(stdscr, LINES - 1); - rc = mutt_bounce_message (NULL, h, adr); address_list_wipe(&adr); /* If no error, or background, display message. */ @@ -454,7 +451,6 @@ void mutt_shell_escape (void) if (!buf[0]) m_strcpy(buf, sizeof(buf), mod_core.shell); if (buf[0]) { - CLEARLINE(stdscr, LINES - 1); mutt_endwin (NULL); fflush (stdout); if (mutt_system (buf) != 0 || option (OPTWAITKEY)) diff --git a/compose.c b/compose.c index cb245dc..b6a6bde 100644 --- a/compose.c +++ b/compose.c @@ -846,7 +846,6 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ int itype; FILE *fp; - CLEARLINE(stdscr, LINES - 1); fname[0] = 0; if (mutt_get_field (_("New file: "), fname, sizeof (fname), M_FILE) != 0 || !fname[0]) diff --git a/flags.c b/flags.c index 137c789..7aa65d4 100644 --- a/flags.c +++ b/flags.c @@ -334,15 +334,12 @@ int mutt_change_flag(HEADER * h, int bf) mvwprintw(stdscr, LINES - 1, 0, "%s? (D/N/O/r/*/!): ", bf ? _("Set flag") : _("Clear flag")); wclrtoeol(stdscr); - c = mutt_getch().ch; + CLEARLINE(stdscr, LINES - 1); if (c == -1) { - CLEARLINE(stdscr, LINES - 1); return (-1); } - CLEARLINE(stdscr, LINES - 1); - if (c < 0 || c > countof(actions) || !actions[c]) { BEEP(); return -1; diff --git a/init.c b/init.c index ce05070..323d5ac 100644 --- a/init.c +++ b/init.c @@ -433,9 +433,7 @@ int query_quadoption2(int v, const char *prompt) return (v); default: - v = mutt_yesorno(prompt, (v == M_ASKYES)); - CLEARLINE(stdscr, LINES - 1); - return (v); + return mutt_yesorno(prompt, (v == M_ASKYES)); } } @@ -449,12 +447,8 @@ int query_quadoption (int opt, const char *prompt) return (v); default: - v = mutt_yesorno (prompt, (v == M_ASKYES)); - CLEARLINE(stdscr, LINES - 1); - return (v); + return mutt_yesorno(prompt, (v == M_ASKYES)); } - - /* not reached */ } /* always wise to do what someone else did before */ diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index c51f1a4..1051759 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -199,6 +199,7 @@ int mutt_yesorno (const char *msg, int def) waddstr (stdscr, (char *) (def == M_YES ? yes : no)); mutt_refresh (); } + CLEARLINE(stdscr, LINES - 1); return (def); } diff --git a/muttlib.c b/muttlib.c index 79fc2c5..1dcd5eb 100644 --- a/muttlib.c +++ b/muttlib.c @@ -349,8 +349,6 @@ int mutt_save_confirm (const char *s, struct stat *st) } } } - - CLEARLINE(stdscr, LINES - 1); return (ret); } diff --git a/recvattach.c b/recvattach.c index 518cb59..29fbb9f 100644 --- a/recvattach.c +++ b/recvattach.c @@ -483,10 +483,8 @@ mutt_query_pipe_attachment(char *command, FILE * fp, BODY * body, int afilter) snprintf(warning, sizeof (warning), _("WARNING! You are about to overwrite %s, continue?"), body->filename); - if (mutt_yesorno (warning, M_NO) != M_YES) { - CLEARLINE(stdscr, LINES - 1); - return; - } + if (mutt_yesorno (warning, M_NO) != M_YES) + return tempfd = m_tempfd(tfile, sizeof(tfile), NONULL(mod_core.tmpdir), NULL); } diff --git a/recvcmd.c b/recvcmd.c index b31fa8a..88cec92 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -161,13 +161,10 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr __attribute__ ((unused)), if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) { address_list_wipe(&adr); - CLEARLINE(stdscr, LINES - 1); mutt_message (p ? _("Message not bounced.") : _("Messages not bounced.")); return; } - CLEARLINE(stdscr, LINES - 1); - if (cur) ret = mutt_bounce_message (fp, cur->hdr, adr); else { -- 2.20.1