aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-06-07 13:07:02 +0900
committererw7 <erw7.github@gmail.com>2019-06-09 13:28:10 +0900
commit1fbc01f4ab7c652b26f96fe19936f5f8e1f38e45 (patch)
treeb238b08f9f891cc0e30c9c6069a51fd61731ca10 /src/nvim/os
parent2d6e44087734a39b5e0f2789bcd68e1a4526955f (diff)
downloadrneovim-1fbc01f4ab7c652b26f96fe19936f5f8e1f38e45.tar.gz
rneovim-1fbc01f4ab7c652b26f96fe19936f5f8e1f38e45.tar.bz2
rneovim-1fbc01f4ab7c652b26f96fe19936f5f8e1f38e45.zip
Fix problems with message catalog directory
- In appimage, the message catalog is not used because there is no message catalog in LOCALE_INSTALL_DIR. Therefore, change to exepath/../share/locale instead of LOCALE_INSTALL_DIR. - The old vim style($runtime/lang) is no longer used. Thus all relevant code is removed.
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/env.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index b067de608b..871298f415 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -805,10 +805,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;
}
}
@@ -955,22 +955,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)