forked from aniani/vim
updated for version 7.3.442
Problem: Still read modelines for ":doautocmd". Solution: Move check for <nomodeline> to separate function.
This commit is contained in:
25
src/fileio.c
25
src/fileio.c
@@ -8740,13 +8740,7 @@ ex_doautoall(eap)
|
||||
aco_save_T aco;
|
||||
buf_T *buf;
|
||||
char_u *arg = eap->arg;
|
||||
int call_do_modelines = TRUE;
|
||||
|
||||
if (STRNCMP(arg, "<nomodeline>", 12) == 0)
|
||||
{
|
||||
call_do_modelines = FALSE;
|
||||
arg = skipwhite(arg + 12);
|
||||
}
|
||||
int call_do_modelines = check_nomodeline(&arg);
|
||||
|
||||
/*
|
||||
* This is a bit tricky: For some commands curwin->w_buffer needs to be
|
||||
@@ -8785,6 +8779,23 @@ ex_doautoall(eap)
|
||||
check_cursor(); /* just in case lines got deleted */
|
||||
}
|
||||
|
||||
/*
|
||||
* Check *argp for <nomodeline>. When it is present return FALSE, otherwise
|
||||
* return TRUE and advance *argp to after it.
|
||||
* Thus return TRUE when do_modelines() should be called.
|
||||
*/
|
||||
int
|
||||
check_nomodeline(argp)
|
||||
char_u **argp;
|
||||
{
|
||||
if (STRNCMP(*argp, "<nomodeline>", 12) == 0)
|
||||
{
|
||||
*argp = skipwhite(*argp + 12);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare for executing autocommands for (hidden) buffer "buf".
|
||||
* Search for a visible window containing the current buffer. If there isn't
|
||||
|
||||
Reference in New Issue
Block a user