mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch: 8.0.0104
Problem: Value of 'thesaurus' option not checked properly.
Solution: Add P_NDNAME flag. (Daisuke Suzuki)
f422bcc7f9
This commit is contained in:
commit
172722ec51
@ -2451,6 +2451,7 @@ return {
|
||||
full_name='thesaurus', abbreviation='tsr',
|
||||
type='string', list='onecomma', scope={'global', 'buffer'},
|
||||
deny_duplicates=true,
|
||||
normal_dname_chars=true,
|
||||
vi_def=true,
|
||||
expand=true,
|
||||
varname='p_tsr',
|
||||
|
@ -104,17 +104,25 @@ func Test_keymap_valid()
|
||||
call assert_fails(":set kmp=trunc\x00name", "trunc")
|
||||
endfunc
|
||||
|
||||
func Test_dictionary()
|
||||
func Check_dir_option(name)
|
||||
" Check that it's possible to set the option.
|
||||
set dictionary=/usr/share/dict/words
|
||||
call assert_equal('/usr/share/dict/words', &dictionary)
|
||||
set dictionary=/usr/share/dict/words,/and/there
|
||||
call assert_equal('/usr/share/dict/words,/and/there', &dictionary)
|
||||
set dictionary=/usr/share/dict\ words
|
||||
call assert_equal('/usr/share/dict words', &dictionary)
|
||||
exe 'set ' . a:name . '=/usr/share/dict/words'
|
||||
call assert_equal('/usr/share/dict/words', eval('&' . a:name))
|
||||
exe 'set ' . a:name . '=/usr/share/dict/words,/and/there'
|
||||
call assert_equal('/usr/share/dict/words,/and/there', eval('&' . a:name))
|
||||
exe 'set ' . a:name . '=/usr/share/dict\ words'
|
||||
call assert_equal('/usr/share/dict words', eval('&' . a:name))
|
||||
|
||||
" Check rejecting weird characters.
|
||||
call assert_fails("set dictionary=/not&there", "E474:")
|
||||
call assert_fails("set dictionary=/not>there", "E474:")
|
||||
call assert_fails("set dictionary=/not.*there", "E474:")
|
||||
call assert_fails("set " . a:name . "=/not&there", "E474:")
|
||||
call assert_fails("set " . a:name . "=/not>there", "E474:")
|
||||
call assert_fails("set " . a:name . "=/not.*there", "E474:")
|
||||
endfunc
|
||||
|
||||
func Test_dictionary()
|
||||
call Check_dir_option('dictionary')
|
||||
endfunc
|
||||
|
||||
func Test_thesaurus()
|
||||
call Check_dir_option('thesaurus')
|
||||
endfunc
|
||||
|
@ -848,7 +848,7 @@ static const int included_patches[] = {
|
||||
// 107 NA
|
||||
// 106,
|
||||
// 105 NA
|
||||
// 104,
|
||||
104,
|
||||
// 103 NA
|
||||
102,
|
||||
101,
|
||||
|
Loading…
Reference in New Issue
Block a user