aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memory.c
diff options
context:
space:
mode:
authorPavel Platto <hinidu@gmail.com>2015-01-20 20:03:39 +0200
committerPavel Platto <hinidu@gmail.com>2015-01-20 21:09:45 +0200
commit85f342a110358358608c05aa1c5c6b433d0cea9a (patch)
treeee27b2801238c324c953d0866bc328b8d0f1f36a /src/nvim/memory.c
parentda43f70ba726cc6dfcf3bc8c73b86a5be713cb47 (diff)
downloadrneovim-85f342a110358358608c05aa1c5c6b433d0cea9a.tar.gz
rneovim-85f342a110358358608c05aa1c5c6b433d0cea9a.tar.bz2
rneovim-85f342a110358358608c05aa1c5c6b433d0cea9a.zip
vim-patch:7.4.446
Problem: In some situations, when setting up an environment to trigger an autocommand, the environment is not properly restored. Solution: Check the return value of switch_win() and call restore_win() always. (Daniel Hahler) https://code.google.com/p/vim/source/detail?r=v7-4-446
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r--src/nvim/memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index a2274a25fe..c954ab3c7b 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -489,7 +489,8 @@ void free_all_mem(void)
return;
entered = true;
- block_autocmds(); /* don't want to trigger autocommands here */
+ // Don't want to trigger autocommands from here on.
+ block_autocmds();
/* Close all tabs and windows. Reset 'equalalways' to avoid redraws. */
p_ea = FALSE;