From 9c1d50eee2fbadd80b584ef7a496bcbbe082541a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 13 Aug 2013 12:56:35 +0200 Subject: Redraw screen if command prompt is canceled When pressing escape or entering an empty command, we returned from key_generic_cmd() without updating the screen. Fix this by creating a cleanup section at the bottom of key_generic_cmd() and jump to that section when the command prompt is cancelled. Signed-off-by: Lukas Fleischer --- src/calcurse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calcurse.c b/src/calcurse.c index 6d18e23..98075d9 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -494,7 +494,7 @@ static inline void key_generic_cmd(void) status_mesg(_("Command:"), ""); if (getstring(win[STA].p, cmd, BUFSIZ, 0, 1) != GETSTRING_VALID) - return; + goto cleanup; cmd_name = strtok(cmd, " "); if (cmd_name[strlen(cmd_name) - 1] == '!') { @@ -543,6 +543,7 @@ static inline void key_generic_cmd(void) warnbox(error_msg); } +cleanup: wins_update(FLAG_ALL); } -- cgit v1.2.3