mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
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:
@@ -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'
|
||||
|
||||
@@ -1554,6 +1554,7 @@ static char *modeline_whitelist[] =
|
||||
"filetype",
|
||||
"foldcolumn",
|
||||
"foldenable",
|
||||
"foldmarker",
|
||||
"foldmethod",
|
||||
"modifiable",
|
||||
"readonly",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
465,
|
||||
/**/
|
||||
464,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user