From: Jonas Fonseca Date: Sun, 14 May 2006 03:13:21 +0000 (+0200) Subject: Try to improve report("") X-Git-Tag: tig-0.2~5 X-Git-Url: https://git.distorted.org.uk/~mdw/tig/commitdiff_plain/4b76734f232087eeb057fcd4a64f7c13b7980cf6?hp=fac7db6cc6c5bd2f036921d2f27faecfffa14acf Try to improve report("") --- diff --git a/tig.c b/tig.c index 5ca8a02..f134960 100644 --- a/tig.c +++ b/tig.c @@ -458,6 +458,7 @@ struct keymap keymap[] = { /* wgetch() with nodelay() enabled returns ERR when there's no input. */ { ERR, REQ_SCREEN_UPDATE }, + /* Use the ncurses SIGWINCH handler. */ { KEY_RESIZE, REQ_SCREEN_RESIZE }, }; @@ -1620,15 +1621,16 @@ report(const char *msg, ...) { va_list args; - va_start(args, msg); - /* Update the title window first, so the cursor ends up in the status * window. */ update_view_title(display[current_view]); + va_start(args, msg); + werase(status_win); wmove(status_win, 0, 0); - vwprintw(status_win, msg, args); + if (*msg) + vwprintw(status_win, msg, args); wrefresh(status_win); va_end(args);