mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.1.1367: can set 'modelineexpr' in modeline
Problem: can set 'modelineexpr' in modeline. Solution: Add P_SECURE flag.
This commit is contained in:
@@ -1889,7 +1889,7 @@ static struct vimoption options[] =
|
|||||||
{"modeline", "ml", P_BOOL|P_VIM,
|
{"modeline", "ml", P_BOOL|P_VIM,
|
||||||
(char_u *)&p_ml, PV_ML,
|
(char_u *)&p_ml, PV_ML,
|
||||||
{(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
|
{(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 *)&p_mle, PV_NONE,
|
||||||
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
|
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
|
||||||
{"modelines", "mls", P_NUM|P_VI_DEF,
|
{"modelines", "mls", P_NUM|P_VI_DEF,
|
||||||
|
@@ -119,6 +119,7 @@ func Test_modeline_fails_always()
|
|||||||
call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:')
|
call s:modeline_fails('makespellmem', 'makespellmem=Something()', 'E520:')
|
||||||
call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
|
call s:modeline_fails('mzschemedll', 'mzschemedll=Something()', 'E520:')
|
||||||
call s:modeline_fails('mzschemegcdll', 'mzschemegcdll=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('omnifunc', 'omnifunc=Something()', 'E520:')
|
||||||
call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:')
|
call s:modeline_fails('operatorfunc', 'operatorfunc=Something()', 'E520:')
|
||||||
call s:modeline_fails('perldll', 'perldll=Something()', 'E520:')
|
call s:modeline_fails('perldll', 'perldll=Something()', 'E520:')
|
||||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1367,
|
||||||
/**/
|
/**/
|
||||||
1366,
|
1366,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user