summaryrefslogtreecommitdiffstats
path: root/curs_lib.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-11-25 12:57:31 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-11-25 12:57:31 +0000
commite3c3035ca3d198f48846bd3d966a7860f0a61067 (patch)
tree98dde723d9978e3303c09b3c99b02faca32f9dbb /curs_lib.c
parent0570f9dca7f6b07b47ddd2655466e681024796f4 (diff)
A modified version of Tommi Komulainen's imap keepalive patch.
Diffstat (limited to 'curs_lib.c')
-rw-r--r--curs_lib.c44
1 files changed, 30 insertions, 14 deletions
diff --git a/curs_lib.c b/curs_lib.c
index 7672e550..a8a34a42 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -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