mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
af93691b53
This commit is contained in:
@@ -154,6 +154,9 @@ local dump_option = function(i, o)
|
||||
table.insert(defines, { 'PV_' .. varname:sub(3):upper() , pv_name})
|
||||
w(' .indir=' .. pv_name)
|
||||
end
|
||||
if o.cb then
|
||||
w(' .opt_did_set_cb=' .. o.cb)
|
||||
end
|
||||
if o.enable_if then
|
||||
w('#else')
|
||||
w(' .var=NULL')
|
||||
|
Reference in New Issue
Block a user