summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-25 20:12:55 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-25 20:12:55 -0500
commitbf9a22bfff4051a70dcebbcd471eddb7b7724f7a (patch)
tree45c1864c78c6744977e39a994a1736712c419e9b /command.c
parent261c177480a0379e77af6ad36a6259f751a504c7 (diff)
clip selector, save as
Diffstat (limited to 'command.c')
-rw-r--r--command.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/command.c b/command.c
index 2364442..a2c424d 100644
--- a/command.c
+++ b/command.c
@@ -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;
}