diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-12 02:42:13 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-12 02:42:13 +0200 |
| commit | ad4eb18e43d56d7ec93770af674418451daae694 (patch) | |
| tree | 4779887d56e4640f60b5c4d796def4ebb3e4af6e /src/nvim/os | |
| parent | 48dc6344d665a7537fb000ec64ab95a37faa07f3 (diff) | |
| parent | 2fbeea8326e2e3724482d4131f10c1b1990a1687 (diff) | |
| download | rneovim-ad4eb18e43d56d7ec93770af674418451daae694.tar.gz rneovim-ad4eb18e43d56d7ec93770af674418451daae694.tar.bz2 rneovim-ad4eb18e43d56d7ec93770af674418451daae694.zip | |
Merge #10098 'win: fix msg_puts_printf()'
Diffstat (limited to 'src/nvim/os')
| -rw-r--r-- | src/nvim/os/env.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 33b67a8116..62457e155c 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -845,10 +845,10 @@ char *vim_getenv(const char *name) // next time, and others can also use it (e.g. Perl). if (vim_path != NULL) { if (vimruntime) { - vim_setenv("VIMRUNTIME", vim_path); + os_setenv("VIMRUNTIME", vim_path, 1); didset_vimruntime = true; } else { - vim_setenv("VIM", vim_path); + os_setenv("VIM", vim_path, 1); didset_vim = true; } } @@ -995,22 +995,6 @@ char_u * home_replace_save(buf_T *buf, char_u *src) FUNC_ATTR_NONNULL_RET return dst; } -/// Vim setenv() wrapper with special handling for $VIMRUNTIME to keep the -/// localization machinery sane. -void vim_setenv(const char *name, const char *val) -{ - os_setenv(name, val, 1); -#ifndef LOCALE_INSTALL_DIR - // When setting $VIMRUNTIME adjust the directory to find message - // translations to $VIMRUNTIME/lang. - if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) { - char *buf = (char *)concat_str((char_u *)val, (char_u *)"/lang"); - bindtextdomain(PROJECT_NAME, buf); - xfree(buf); - } -#endif -} - /// Function given to ExpandGeneric() to obtain an environment variable name. char_u *get_env_name(expand_T *xp, int idx) |