aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/generators/gen_options.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-24 22:30:04 -0400
committerGitHub <noreply@github.com>2020-10-24 22:30:04 -0400
commitb59b8dd5b5fbb7f1b2695fd3effb507e0e059a85 (patch)
tree7a65a928cb0b6ad0e59cda5b4c45d5be87628da3 /src/nvim/generators/gen_options.lua
parente37651deb79abf650ff0ce1682fbd836283af69b (diff)
downloadrneovim-b59b8dd5b5fbb7f1b2695fd3effb507e0e059a85.tar.gz
rneovim-b59b8dd5b5fbb7f1b2695fd3effb507e0e059a85.tar.bz2
rneovim-b59b8dd5b5fbb7f1b2695fd3effb507e0e059a85.zip
options: add fallback value to .indir member (#13150)
Required for patch v8.1.1769.
Diffstat (limited to 'src/nvim/generators/gen_options.lua')
-rw-r--r--src/nvim/generators/gen_options.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/generators/gen_options.lua b/src/nvim/generators/gen_options.lua
index a8cf496cb9..d80a6219eb 100644
--- a/src/nvim/generators/gen_options.lua
+++ b/src/nvim/generators/gen_options.lua
@@ -141,9 +141,6 @@ local dump_option = function(i, o)
elseif #o.scope == 1 and o.scope[1] == 'window' then
w(' .var=VAR_WIN')
end
- if o.enable_if then
- w('#endif')
- end
if #o.scope == 1 and o.scope[1] == 'global' then
w(' .indir=PV_NONE')
else
@@ -163,6 +160,12 @@ local dump_option = function(i, o)
defines['PV_' .. varname:sub(3):upper()] = pv_name
w(' .indir=' .. pv_name)
end
+ if o.enable_if then
+ w('#else')
+ w(' .var=NULL')
+ w(' .indir=PV_NONE')
+ w('#endif')
+ end
if o.defaults then
if o.defaults.condition then
w(get_cond(o.defaults.condition))