summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/command.c b/command.c
index 00e9f94..6a6b331 100644
--- a/command.c
+++ b/command.c
@@ -141,7 +141,14 @@ void command_execute(Ted *ted, Command c, i64 argument) {
ted_load_font(ted);
}
} break;
-
+
+ case CMD_ESCAPE:
+ if (ted->menu) {
+ ted_menu_close(ted, true);
+ } else if (buffer) {
+ buffer_disable_selection(buffer);
+ }
+ break;
}
if (buffer && buffer_haserr(buffer)) {