{"compatible", "cp", P_BOOL|P_RALL,
(char_u *)&p_cp, PV_NONE, did_set_compatible, NULL,
{(char_u *)TRUE, (char_u *)FALSE} SCTX_INIT},
- {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP,
+ {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP|P_MLE,
(char_u *)&p_cpt, PV_CPT, did_set_complete, expand_set_complete,
{(char_u *)".,w,b,u,t,i", (char_u *)0L}
SCTX_INIT},
{(char_u *)NULL, (char_u *)0L}
#endif
SCTX_INIT},
- {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN,
+ {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN|P_MLE,
#if defined(FEAT_GUI_TABLINE)
(char_u *)&p_gtt, PV_NONE, NULL, NULL,
{(char_u *)"", (char_u *)0L}
{(char_u *)NULL, (char_u *)0L}
#endif
SCTX_INIT},
- {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
+ {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT|P_MLE,
#ifdef FEAT_PRINTER
(char_u *)&p_header, PV_NONE, NULL, NULL,
// untranslated to avoid problems when 'encoding'
set equalalways&
endfunc
+func Test_modeline_forbidden()
+ let tempfile = tempname()
+ let lines =<< trim END
+ some test text for completion
+ vim: set complete=F{->system('touch_should_not_run')} :
+ END
+ call writefile(lines, tempfile, 'D')
+ call assert_fails($'new {tempfile}', 'E992:')
+ bw!
+ let lines =<< trim END
+ some text
+ vim: set guitabtooltip=%{%mapset()%}:
+ END
+ call writefile(lines, tempfile)
+ call assert_fails($'new {tempfile}', 'E992:')
+ bw!
+ let lines =<< trim END
+ some text
+ vim: set printheader=%{mapset('n',0,{})%)%}:
+ END
+ call writefile(lines, tempfile, 'D')
+ call assert_fails($'new {tempfile}', 'E992:')
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab