diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-12 20:14:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-12 20:14:01 +0100 |
commit | 60542ac9fd078d5f87fa5f91131432d8a316bb0f (patch) | |
tree | 662ab1896c75b1419af0d0c182df62a3cf1600bb /src/ex_docmd.c | |
parent | bbc98db7c45ed9c8a6bbc7e2ac7c67180ccbab16 (diff) | |
download | vim-git-60542ac9fd078d5f87fa5f91131432d8a316bb0f.tar.gz |
updated for version 7.3.442v7.3.442
Problem: Still read modelines for ":doautocmd".
Solution: Move check for <nomodeline> to separate function.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 83bf50c4b..133fa7d68 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4955,7 +4955,7 @@ ex_abclear(eap) map_clear(eap->cmd, eap->arg, TRUE, TRUE); } -#ifdef FEAT_AUTOCMD +#if defined(FEAT_AUTOCMD) || defined(PROTO) static void ex_autocmd(eap) exarg_T *eap; @@ -4982,8 +4982,12 @@ ex_autocmd(eap) ex_doautocmd(eap) exarg_T *eap; { - (void)do_doautocmd(eap->arg, TRUE); - do_modelines(0); + char_u *arg = eap->arg; + int call_do_modelines = check_nomodeline(&arg); + + (void)do_doautocmd(arg, TRUE); + if (call_do_modelines) /* Only when there is no <nomodeline>. */ + do_modelines(0); } #endif |