mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
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)
1610d05241
This commit is contained in:

committed by
Justin M. Keyes

parent
0f381f26cb
commit
73b8424fad
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user