From d1af07d06f044718fa63af0e6db527275e1f6813 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 26 Mar 2022 23:07:04 -0400 Subject: fix session problems --- README.md | 2 +- main.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a091504..ea67d9f 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ Then, open windows\_installer\\ted\\ted.sln, and build. 0.8 Autocomplete 2021 Mar 4 1.0 Bugfixes, small additional features, installers 2021 Apr 20 1.0r1 Windows-specific bugfixes, update to new version of PCRE2 2022 Jan 1 -1.0r2 Various ctrl+w (:tab-close) bugfixes 2022 Mar 26 +1.0r2 Various bugfixes involving closing tabs and windows 2022 Mar 26 ## License 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]) -- cgit v1.2.3