mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 16:42:42 +00:00
refactor(options): get_option_value_strict() and SREQ_*
`SREQ_*` values are now actual typedef'd enums. `get_option_value_strict()` has also been refactored and split into two functions, `get_option_attrs()` for getting the option attributes, and `get_option_value_strict()` for getting the actual value. Moreover, it now returns an `OptVal`. Other miscellaneous refactors have also been made.
This commit is contained in:
committed by
Lewis Russell
parent
f4b896198f
commit
6c87d3e0fb
@@ -1493,7 +1493,7 @@ describe('API', function()
|
||||
pcall_err(nvim, 'set_option_value', 'scrolloff', 1, {scope = 'bogus'}))
|
||||
eq("Invalid 'scope': expected String, got Integer",
|
||||
pcall_err(nvim, 'get_option_value', 'scrolloff', {scope = 42}))
|
||||
eq("Invalid 'value': expected Integer/Boolean/String, got Array",
|
||||
eq("Invalid 'value': expected valid option type, got Array",
|
||||
pcall_err(nvim, 'set_option_value', 'scrolloff', {}, {}))
|
||||
eq("Invalid value for option 'scrolloff': expected Number, got Boolean true",
|
||||
pcall_err(nvim, 'set_option_value', 'scrolloff', true, {}))
|
||||
|
||||
Reference in New Issue
Block a user