diff options
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index b2aef13946..8789075c44 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -10,6 +10,7 @@ #include "nvim/vim.h" #include "nvim/eval.h" +#include "nvim/highlight.h" #include "nvim/memfile.h" #include "nvim/memory.h" #include "nvim/message.h" @@ -618,7 +619,6 @@ void free_all_mem(void) /* Obviously named calls. */ free_all_autocmds(); - free_all_options(); free_all_marks(); alist_clear(&global_alist); free_homedir(); @@ -656,6 +656,9 @@ void free_all_mem(void) /* Destroy all windows. Must come before freeing buffers. */ win_free_all(); + // Free all option values. Must come after closing windows. + free_all_options(); + free_cmdline_buf(); /* Clear registers. */ @@ -696,7 +699,7 @@ void free_all_mem(void) /* screenlines (can't display anything now!) */ free_screenlines(); - clear_hl_tables(); + clear_hl_tables(false); list_free_log(); } |