diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-23 17:08:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-23 17:08:49 +0200 |
commit | 7e800c6047c8a9cc3e5cbc019a4dc91ec36616b1 (patch) | |
tree | 49bd1954ee9fe9646b1f177db93b9dd23a95a7a2 /src | |
parent | 110289e78195b6d01e1e6ad26ad450de476d41c1 (diff) | |
download | vim-git-7e800c6047c8a9cc3e5cbc019a4dc91ec36616b1.tar.gz |
patch 8.1.1367: can set 'modelineexpr' in modelinev8.1.1367
Problem: can set 'modelineexpr' in modeline.
Solution: Add P_SECURE flag.
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 2 | ||||
-rw-r--r-- | src/testdir/test_modeline.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c index 8e62efc99..39ef052ee 100644 --- a/src/option.c +++ b/src/option.c @@ -1889,7 +1889,7 @@ static struct vimoption options[] = {"modeline", "ml", P_BOOL|P_VIM, (char_u *)&p_ml, PV_ML, {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, - {"modelineexpr", "mle", P_BOOL|P_VI_DEF, + {"modelineexpr", "mle", P_BOOL|P_VI_DEF|P_SECURE, (char_u *)&p_mle, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, {"modelines", "mls", P_NUM|P_VI_DEF, diff --git a/src/testdir/test_modeline.vim b/src/testdir/test_modeline.vim index c33a0801c..c3c624d26 100644 --- a/src/testdir/test_modeline.vim +++ b/src/testdir/test_modeline.vim @@ -119,6 +119,7 @@ func Test_modeline_fails_always() call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:') call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:') call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=Something()', 'E520:') + call s:modeline_fails('modelineexpr', 'modelineexpr', 'E520:') call s:modeline_fails('omnifunc', 'omnifunc=Something()', 'E520:') call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:') call s:modeline_fails('perldll', 'perldll=Something()', 'E520:') diff --git a/src/version.c b/src/version.c index bcc9aeff2..7c548bdba 100644 --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1367, +/**/ 1366, /**/ 1365, |