diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-29 13:49:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-29 13:49:09 +0100 |
commit | 011a34d77da520b383712dd92b4e63c5fc52d969 (patch) | |
tree | 956d237a72dda08b64db8c817384d9917ec9fd0b /src/misc1.c | |
parent | 52379eadfb8a6689f083ea7dacfc3bf1539f450f (diff) | |
download | vim-011a34d77da520b383712dd92b4e63c5fc52d969.zip |
updated for version 7.3.457
Problem: When setting $VIMRUNTIME later the directory for fetching
translated messages is not adjusted.
Solution: Put bindtextdomain() in vim_setenv().
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/misc1.c b/src/misc1.c index 1945d0ac9..cc2923908 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -4133,17 +4133,6 @@ vim_getenv(name, mustfree) { vim_setenv((char_u *)"VIMRUNTIME", p); didset_vimruntime = TRUE; -#ifdef FEAT_GETTEXT - { - char_u *buf = concat_str(p, (char_u *)"/lang"); - - if (buf != NULL) - { - bindtextdomain(VIMPACKAGE, (char *)buf); - vim_free(buf); - } - } -#endif } else { @@ -4221,6 +4210,22 @@ vim_setenv(name, val) putenv((char *)envbuf); } #endif +#ifdef FEAT_GETTEXT + /* + * When setting $VIMRUNTIME adjust the directory to find message + * translations to $VIMRUNTIME/lang. + */ + if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0) + { + char_u *buf = concat_str(val, (char_u *)"/lang"); + + if (buf != NULL) + { + bindtextdomain(VIMPACKAGE, (char *)buf); + vim_free(buf); + } + } +#endif } #if defined(FEAT_CMDL_COMPL) || defined(PROTO) |