From 21be28fb8413c6b0f01ae9423824213be2d4177d Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 18 Sep 2006 01:00:29 +0200 Subject: [PATCH] Fix clearing of the status window after prompting --- tig.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tig.c b/tig.c index 18b4488..70bf7f3 100644 --- a/tig.c +++ b/tig.c @@ -3132,17 +3132,18 @@ static bool cursed = FALSE; /* The status window is used for polling keystrokes. */ static WINDOW *status_win; +static bool status_empty = TRUE; + /* Update status and title window. */ static void report(const char *msg, ...) { - static bool empty = TRUE; struct view *view = display[current_view]; if (input_mode) return; - if (!empty || *msg) { + if (!status_empty || *msg) { va_list args; va_start(args, msg); @@ -3151,9 +3152,9 @@ report(const char *msg, ...) wmove(status_win, 0, 0); if (*msg) { vwprintw(status_win, msg, args); - empty = FALSE; + status_empty = FALSE; } else { - empty = TRUE; + status_empty = TRUE; } wrefresh(status_win); @@ -3270,6 +3271,7 @@ read_prompt(const char *prompt) if (status == CANCEL) { /* Clear the status window */ + status_empty = FALSE; report(""); return NULL; } -- 2.11.0