mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0429: no warning when test checks for option that never exists
Problem: No warning when test checks for option that never exists.
Solution: In tests check that the option can exist.
c5a8fdc42d
This commit is contained in:
parent
26dfeb42dd
commit
d712c30fff
@ -12,6 +12,9 @@ endfunc
|
|||||||
" Command to check for the presence of a working option.
|
" Command to check for the presence of a working option.
|
||||||
command -nargs=1 CheckOption call CheckOption(<f-args>)
|
command -nargs=1 CheckOption call CheckOption(<f-args>)
|
||||||
func CheckOption(name)
|
func CheckOption(name)
|
||||||
|
if !exists('&' .. a:name)
|
||||||
|
throw 'Checking for non-existent option ' .. a:name
|
||||||
|
endif
|
||||||
if !exists('+' .. a:name)
|
if !exists('+' .. a:name)
|
||||||
throw 'Skipped: ' .. a:name .. ' option not supported'
|
throw 'Skipped: ' .. a:name .. ' option not supported'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user