diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
commit | b35a780479bbf5038a825d415f9ca49c92f6b425 (patch) | |
tree | 44e71007552714b03ae812e466495ec5c8a7e27b /menu.c | |
parent | a61d90c32d4d6448148894872ebd91eb8f10fc2e (diff) |
ctrl+q to quit (with unsaved changes dialog)
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -129,13 +129,16 @@ static void menu_update(Ted *ted, Menu menu) { // save changes switch (ted->warn_unsaved) { case CMD_TAB_CLOSE: + menu_close(ted, true); if (buffer_save(ted->prev_active_buffer)) { - menu_close(ted, true); command_execute(ted, CMD_TAB_CLOSE, 1); } break; case CMD_QUIT: - assert(0); // @TODO! + menu_close(ted, true); + if (ted_save_all(ted)) { + command_execute(ted, CMD_QUIT, 1); + } break; default: assert(0); |