patch 9.2.0465: modeline: foldmarker cannot be set with modelinestrict

Problem:  modeline: foldmarker cannot be set with modelinestrict
          (Lyderic Landry, after v9.2.0350)
Solution: Add foldmarker option to the whitelist

fixes:  #20028
closes: #20174

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2026-05-10 17:00:59 +00:00
parent ec76ac620b
commit 2020e0bade
4 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.2. Last change: 2026 May 08
*options.txt* For Vim version 9.2. Last change: 2026 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6216,6 +6216,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'filetype'
'foldcolumn'
'foldenable'
'foldmarker'
'foldmethod'
'modifiable'
'readonly'
+1
View File
@@ -1554,6 +1554,7 @@ static char *modeline_whitelist[] =
"filetype",
"foldcolumn",
"foldenable",
"foldmarker",
"foldmethod",
"modifiable",
"readonly",
+2 -1
View File
@@ -563,11 +563,12 @@ func Test_modeline_strict_allowed()
set modeline modelinestrict
" Whitelisted options should work
call writefile(['vim: set ts=2 sw=4 et :'], 'Xmodeline_strict', 'D')
call writefile(['vim: set ts=2 sw=4 et foldmarker=[,]:'], 'Xmodeline_strict', 'D')
split Xmodeline_strict
call assert_equal(2, &ts)
call assert_equal(4, &sw)
call assert_equal(1, &et)
call assert_equal('[,]', &foldmarker)
bwipe!
" 'filetype' should work
+2
View File
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
465,
/**/
464,
/**/