win/defaults: Use "…/nvim-data/site" in 'runtimepath'

On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But
the "…/site" items in 'runtimepath' did not correctly point to that
location, they used "…/nvim/site".

Fix the init logic to use  "…/nvim-data/site".

closes #9910
This commit is contained in:
Justin M. Keyes
2019-04-15 23:44:10 +02:00
parent 83d571653b
commit 769f44e918
5 changed files with 77 additions and 40 deletions

View File

@@ -80,14 +80,14 @@ char *stdpaths_get_xdg_var(const XDGVarType idx)
return ret;
}
/// Return nvim-specific XDG directory subpath
/// Return Nvim-specific XDG directory subpath.
///
/// Windows: Uses "…/nvim-data" for kXDGDataHome to avoid storing
/// configuration and data files in the same path. #4403
///
/// @param[in] idx XDG directory to use.
///
/// @return [allocated] `{xdg_directory}/nvim`
///
/// In WIN32 get_xdg_home(kXDGDataHome) returns `{xdg_directory}/nvim-data` to
/// avoid storing configuration and data files in the same path.
/// @return [allocated] "{xdg_directory}/nvim"
char *get_xdg_home(const XDGVarType idx)
FUNC_ATTR_WARN_UNUSED_RESULT
{