diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-08-13 12:56:35 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-08-13 12:58:23 +0200 |
commit | 9c1d50eee2fbadd80b584ef7a496bcbbe082541a (patch) | |
tree | 11b4fa410f201579508bf8a03dd3f3ecf2062978 | |
parent | 9eadc19a52d27afd1589d88d75f1d58604578285 (diff) | |
download | calcurse-9c1d50eee2fbadd80b584ef7a496bcbbe082541a.zip |
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 <calcurse@cryptocrack.de>
-rw-r--r-- | src/calcurse.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |