To: vim_dev@googlegroups.com Subject: Patch 8.1.1367 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1367 (after 8.1.1366) Problem: can set 'modelineexpr' in modeline. Solution: Add P_SECURE flag. Files: src/option.c, src/testdir/test_modeline.vim *** ../vim-8.1.1366/src/option.c 2019-05-23 15:37:41.965634969 +0200 --- src/option.c 2019-05-23 17:03:12.006442820 +0200 *************** *** 1889,1895 **** {"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, (char_u *)&p_mle, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, {"modelines", "mls", P_NUM|P_VI_DEF, --- 1889,1895 ---- {"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|P_SECURE, (char_u *)&p_mle, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, {"modelines", "mls", P_NUM|P_VI_DEF, *** ../vim-8.1.1366/src/testdir/test_modeline.vim 2019-05-23 15:37:41.965634969 +0200 --- src/testdir/test_modeline.vim 2019-05-23 17:03:54.262203562 +0200 *************** *** 119,124 **** --- 119,125 ---- 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:') *** ../vim-8.1.1366/src/version.c 2019-05-23 15:37:41.965634969 +0200 --- src/version.c 2019-05-23 17:08:31.812617656 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1367, /**/ -- hundred-and-one symptoms of being an internet addict: 20. When looking at a pageful of someone else's links, you notice all of them are already highlighted in purple. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///