summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-09 14:57:58 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-09 14:57:58 -0500
commit859619b443b8d67fb262b3338015b036a1f942e1 (patch)
tree25157f43989bc79cb704186af43ea8dedf407db6 /command.c
parentf9092e361420a44e6ed8e5a1fa13d3fad9f3d7de (diff)
escape command
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)) {