From 73b8424fad108d1ae5981f7fad32f12df35fef2e Mon Sep 17 00:00:00 2001 From: Jurica Bradarić Date: Sun, 4 Sep 2016 23:43:41 +0200 Subject: vim-patch:7.4.1913 (#5260) Problem: When ":doautocmd" is used modelines are used even when no autocommands were executed. (Daniel Hahler) Solution: Skip processing modelines. (closes vim/vim#854) https://github.com/vim/vim/commit/1610d052413e0ed664498853a47acc2d677a22d1 --- src/nvim/ex_cmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 3dcd9a9116..9cf53f0d73 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1711,11 +1711,11 @@ int do_write(exarg_T *eap) goto theend; } - /* If 'filetype' was empty try detecting it now. */ + // If 'filetype' was empty try detecting it now. if (*curbuf->b_p_ft == NUL) { - if (au_has_group((char_u *)"filetypedetect")) - (void)do_doautocmd((char_u *)"filetypedetect BufRead", - TRUE); + if (au_has_group((char_u *)"filetypedetect")) { + (void)do_doautocmd((char_u *)"filetypedetect BufRead", true, NULL); + } do_modelines(0); } -- cgit