diff options
author | ZyX <kp-pav@yandex.ru> | 2016-06-25 23:39:16 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-07-10 02:04:27 +0300 |
commit | 895f712df8afc053b59783189954e665ccd21dab (patch) | |
tree | 0c099358fbe79cf3b9a2b6157018b484b50c1cd7 /scripts/genoptions.lua | |
parent | 5573e1a350dd2df65e21ed48c14cf89f5e9c0e7a (diff) | |
download | rneovim-895f712df8afc053b59783189954e665ccd21dab.tar.gz rneovim-895f712df8afc053b59783189954e665ccd21dab.tar.bz2 rneovim-895f712df8afc053b59783189954e665ccd21dab.zip |
option: Do not expand options, obtained from XDG vars
It is a wrong thing to do, this makes valid variable values be treated
incorrectly: in
XDG_DATA_HOME='/home/$foo/.local/share'
`$foo` should be treated literally and not expanded to `foo` environment
variable value.
Also makes option_expand not try to expand too long strings even if these too
long strings are default values. Previously it thought that default values
should always be expanded. Also does not try to expand NULL should it be the
default value just in case.
Fixes #4961
Diffstat (limited to 'scripts/genoptions.lua')
-rw-r--r-- | scripts/genoptions.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/genoptions.lua b/scripts/genoptions.lua index da53d010bd..9f7d94969d 100644 --- a/scripts/genoptions.lua +++ b/scripts/genoptions.lua @@ -57,9 +57,14 @@ local get_flags = function(o) add_flag(redraw_flags[r_flag]) end end + if o.expand then + add_flag('P_EXPAND') + if o.expand == 'nodefault' then + add_flag('P_NO_DEF_EXP') + end + end for _, flag_desc in ipairs({ {'alloced'}, - {'expand'}, {'nodefault'}, {'no_mkrc'}, {'vi_def'}, |