From db128974fcbd5702ca724610590a5dafa2e87712 Mon Sep 17 00:00:00 2001 From: raichoo Date: Thu, 16 Mar 2017 07:40:31 +0100 Subject: vim-patch:7.4.2348 Problem: Crash on exit when EXITFREE is defined. (Dominique Pelle) Solution: Don't access curwin when exiting. https://github.com/vim/vim/commit/9a27c7fde6d453d9892b6f6baa756bce4d6d419d --- src/nvim/buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index ab45008962..9e781f5dff 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -441,7 +441,11 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) // When closing the current buffer stop Visual mode before freeing // anything. - if (is_curbuf && VIsual_active) { + if (is_curbuf && VIsual_active +#if defined(EXITFREE) + && !entered_free_all_mem +#endif + ) { end_visual_mode(); } -- cgit