diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-09 14:57:58 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-09 14:57:58 -0500 |
commit | 859619b443b8d67fb262b3338015b036a1f942e1 (patch) | |
tree | 25157f43989bc79cb704186af43ea8dedf407db6 /command.c | |
parent | f9092e361420a44e6ed8e5a1fa13d3fad9f3d7de (diff) |
escape command
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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)) { |