diff options
author | ZyX <kp-pav@yandex.ru> | 2016-06-26 17:56:09 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-07-10 02:04:27 +0300 |
commit | c47624482c4ec23d055e30ecb3e24b04794f1235 (patch) | |
tree | f40e61f8cbddc144a0f19e29c7b47846ce7152ba | |
parent | 895f712df8afc053b59783189954e665ccd21dab (diff) | |
download | rneovim-c47624482c4ec23d055e30ecb3e24b04794f1235.tar.gz rneovim-c47624482c4ec23d055e30ecb3e24b04794f1235.tar.bz2 rneovim-c47624482c4ec23d055e30ecb3e24b04794f1235.zip |
option: Also do not expand XDG defaults with set&
-rw-r--r-- | src/nvim/option.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index e75cb38c9e..481e7daa0f 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1477,15 +1477,18 @@ do_set ( * default value was already expanded, only * required when an environment variable was set * later */ - if (newval == NULL) + new_value_alloced = true; + if (newval == NULL) { newval = empty_option; - else { + } else if (!(options[opt_idx].flags | P_NO_DEF_EXP)) { s = option_expand(opt_idx, newval); - if (s == NULL) + if (s == NULL) { s = newval; + } newval = vim_strsave(s); + } else { + newval = (char_u *)xstrdup((char *)newval); } - new_value_alloced = TRUE; } else if (nextchar == '<') { /* set to global val */ newval = vim_strsave(*(char_u **)get_varp_scope( &(options[opt_idx]), OPT_GLOBAL)); |