diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-25 20:12:55 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-25 20:12:55 -0500 |
commit | bf9a22bfff4051a70dcebbcd471eddb7b7724f7a (patch) | |
tree | 45c1864c78c6744977e39a994a1736712c419e9b /command.c | |
parent | 261c177480a0379e77af6ad36a6259f751a504c7 (diff) |
clip selector, save as
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -123,6 +123,11 @@ void command_execute(Ted *ted, Command c, i64 argument) { case CMD_SAVE: if (buffer) buffer_save(buffer); break; + case CMD_SAVE_AS: + if (buffer && !buffer->is_line_buffer) { + menu_open(ted, MENU_SAVE_AS); + } + break; case CMD_UNDO: if (buffer) buffer_undo(buffer, argument); break; @@ -173,7 +178,8 @@ void command_execute(Ted *ted, Command c, i64 argument) { case MENU_NONE: assert(0); break; - case MENU_OPEN: { + case MENU_OPEN: + case MENU_SAVE_AS: { ted->file_selector.submitted = true; } break; } |