diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-11-25 12:57:31 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-11-25 12:57:31 +0000 |
commit | e3c3035ca3d198f48846bd3d966a7860f0a61067 (patch) | |
tree | 98dde723d9978e3303c09b3c99b02faca32f9dbb /curs_lib.c | |
parent | 0570f9dca7f6b07b47ddd2655466e681024796f4 (diff) |
A modified version of Tommi Komulainen's imap keepalive patch.
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 44 |
1 files changed, 30 insertions, 14 deletions
@@ -40,9 +40,16 @@ static event_t *KeyEvent; void mutt_refresh (void) { + /* don't refresh when we are waiting for a child. */ + if (option (OPTKEEPQUIET)) + return; + /* don't refresh in the middle of macros unless necessary */ - if (!UngetCount || option (OPTFORCEREFRESH)) - refresh (); + if (UngetCount && !option (OPTFORCEREFRESH)) + return; + + /* else */ + refresh (); } event_t mutt_getch (void) @@ -205,12 +212,15 @@ void mutt_curses_error (const char *fmt, ...) Errorbuf[ (COLS < sizeof (Errorbuf) ? COLS : sizeof (Errorbuf)) - 2 ] = 0; clean_error_buf(); - BEEP (); - SETCOLOR (MT_COLOR_ERROR); - mvaddstr (LINES-1, 0, Errorbuf); - clrtoeol (); - SETCOLOR (MT_COLOR_NORMAL); - mutt_refresh (); + if (!option (OPTKEEPQUIET)) + { + BEEP (); + SETCOLOR (MT_COLOR_ERROR); + mvaddstr (LINES-1, 0, Errorbuf); + clrtoeol (); + SETCOLOR (MT_COLOR_NORMAL); + mutt_refresh (); + } set_option (OPTMSGERR); } @@ -226,17 +236,23 @@ void mutt_message (const char *fmt, ...) Errorbuf[ (COLS < sizeof (Errorbuf) ? COLS : sizeof (Errorbuf)) - 2 ] = 0; clean_error_buf(); - SETCOLOR (MT_COLOR_MESSAGE); - mvaddstr (LINES - 1, 0, Errorbuf); - clrtoeol (); - SETCOLOR (MT_COLOR_NORMAL); - mutt_refresh (); + if (!option (OPTKEEPQUIET)) + { + SETCOLOR (MT_COLOR_MESSAGE); + mvaddstr (LINES - 1, 0, Errorbuf); + clrtoeol (); + SETCOLOR (MT_COLOR_NORMAL); + mutt_refresh (); + } unset_option (OPTMSGERR); } void mutt_show_error (void) { + if (option (OPTKEEPQUIET)) + return; + SETCOLOR (option (OPTMSGERR) ? MT_COLOR_ERROR : MT_COLOR_MESSAGE); CLEARLINE (LINES-1); addstr (Errorbuf); @@ -251,7 +267,7 @@ void mutt_endwin (const char *msg) CLEARLINE (LINES - 1); move (LINES - 1, 0); #else - move (LINES - 1, COLS - 1); + move (LINES - 1, COLS - 1); CLEARLINE (LINES - 1); #endif |