aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2019-06-22 22:06:30 -0400
committerJames McCoy <jamessan@jamessan.com>2019-06-24 06:46:00 -0400
commit2db189f57c75fae1c7cf0abcf9cb7f8737b93f0d (patch)
tree1c1961d1ce601f5c1b308277ad304136d3864a8e
parent1e4673d167f87ed89be397df936c32547c278d0b (diff)
downloadrneovim-2db189f57c75fae1c7cf0abcf9cb7f8737b93f0d.tar.gz
rneovim-2db189f57c75fae1c7cf0abcf9cb7f8737b93f0d.tar.bz2
rneovim-2db189f57c75fae1c7cf0abcf9cb7f8737b93f0d.zip
vim-patch:8.1.1367: can set 'modelineexpr' in modeline
Problem: can set 'modelineexpr' in modeline. Solution: Add P_SECURE flag. https://github.com/vim/vim/commit/7e800c6047c8a9cc3e5cbc019a4dc91ec36616b1
-rw-r--r--src/nvim/options.lua1
-rw-r--r--src/nvim/testdir/test_modeline.vim1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 4a818d3a4a..e892e59ba6 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -1540,6 +1540,7 @@ return {
full_name='modelineexpr', abbreviation='mle',
type='bool', scope={'global'},
vi_def=true,
+ secure=true,
varname='p_mle',
defaults={if_true={vi=false}}
},
diff --git a/src/nvim/testdir/test_modeline.vim b/src/nvim/testdir/test_modeline.vim
index 8f2c42a6b5..8cd6e552e7 100644
--- a/src/nvim/testdir/test_modeline.vim
+++ b/src/nvim/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=Something()', '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:')