diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-01 15:02:40 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-01 15:02:40 -0500 |
commit | 12bb6e2cd377d3dfa2f7ec037c31463c3f9070d1 (patch) | |
tree | e3311ad77bd0fb768adcdce7582397cf97f40183 /command.c | |
parent | 2d327302b30bf67a87538dc5e005c0399c0b8f1a (diff) |
restore session
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -155,12 +155,11 @@ void command_execute(Ted *ted, Command c, i64 argument) { menu_open(ted, MENU_OPEN); break; case CMD_NEW: - ted_new_file(ted); + ted_new_file(ted, NULL); break; case CMD_SAVE: if (buffer) { - if (buffer->filename && streq(buffer->filename, TED_UNTITLED)) { - // don't worry, this won't catch files called "Untitled"; buffer->filename is the full path. + if (buffer_is_untitled(buffer)) { command_execute(ted, CMD_SAVE_AS, 1); return; } |