summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/command.c b/command.c
index a8dc7e2..2364442 100644
--- a/command.c
+++ b/command.c
@@ -158,7 +158,10 @@ void command_execute(Ted *ted, Command c, i64 argument) {
} break;
case CMD_ESCAPE:
- if (ted->menu) {
+ if (*ted->error_shown) {
+ // dismiss error box
+ *ted->error_shown = '\0';
+ } else if (ted->menu) {
menu_close(ted, true);
} else if (buffer) {
buffer_disable_selection(buffer);