aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorraichoo <raichoo@googlemail.com>2017-03-16 07:40:31 +0100
committerraichoo <raichoo@googlemail.com>2017-03-19 21:14:11 +0100
commitdb128974fcbd5702ca724610590a5dafa2e87712 (patch)
tree19ac0fc387684dcf336324ac8575b90896bac7ce /src/nvim/buffer.c
parent99f2dc1341c8501290e3a0b297e1700f74fd17a3 (diff)
downloadrneovim-db128974fcbd5702ca724610590a5dafa2e87712.tar.gz
rneovim-db128974fcbd5702ca724610590a5dafa2e87712.tar.bz2
rneovim-db128974fcbd5702ca724610590a5dafa2e87712.zip
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
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c6
1 files changed, 5 insertions, 1 deletions
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();
}