summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-03-26 23:07:04 -0400
committerpommicket <pommicket@gmail.com>2022-03-26 23:07:04 -0400
commitd1af07d06f044718fa63af0e6db527275e1f6813 (patch)
tree5efb5b747755d9c0678d8479e573448994542a93 /main.c
parentd334b04c4d7de2e200a1a37fbf1ecc2758280e94 (diff)
fix session problems
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.c b/main.c
index be1d2f0..557a1ea 100644
--- a/main.c
+++ b/main.c
@@ -947,7 +947,12 @@ int main(int argc, char **argv) {
#endif
}
-
+
+ if (ted->find)
+ find_close(ted);
+ build_stop(ted);
+ if (ted->menu)
+ menu_close(ted);
session_write(ted);
arr_foreach_ptr(ted->shell_history, char *, cmd) {
@@ -964,11 +969,7 @@ int main(int argc, char **argv) {
SDL_GL_DeleteContext(glctx);
SDL_DestroyWindow(window);
SDL_Quit();
- build_stop(ted);
- if (ted->menu)
- menu_close(ted); // free any memory used by the current menu
if (log) fclose(log);
- find_close(ted);
tag_selector_close(ted);
for (u16 i = 0; i < TED_MAX_BUFFERS; ++i)
if (ted->buffers_used[i])