win/env: fix stdpath()/XDG_* initialization, parsing #12829

- Windows environment variables are semicolon-separated, but some logic
  was assuming colon (:). This broke initialization and parsing of
  XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc.
- test/defaults_spec: enable tests on Windows

ref #12793
This commit is contained in:
erw7
2020-09-08 14:40:12 +09:00
committed by GitHub
parent 6abbc157af
commit aa45579206
3 changed files with 149 additions and 129 deletions

View File

@@ -7075,7 +7075,7 @@ void get_xdg_var_list(const XDGVarType xdg, typval_T *rettv)
do {
size_t dir_len;
const char *dir;
iter = vim_env_iter(':', dirs, iter, &dir, &dir_len);
iter = vim_env_iter(ENV_SEPCHAR, dirs, iter, &dir, &dir_len);
if (dir != NULL && dir_len > 0) {
char *dir_with_nvim = xmemdupz(dir, dir_len);
dir_with_nvim = concat_fnames_realloc(dir_with_nvim, "nvim", true);