mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
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().
This commit is contained in:
27
src/misc1.c
27
src/misc1.c
@@ -4133,17 +4133,6 @@ vim_getenv(name, mustfree)
|
|||||||
{
|
{
|
||||||
vim_setenv((char_u *)"VIMRUNTIME", p);
|
vim_setenv((char_u *)"VIMRUNTIME", p);
|
||||||
didset_vimruntime = TRUE;
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -4221,6 +4210,22 @@ vim_setenv(name, val)
|
|||||||
putenv((char *)envbuf);
|
putenv((char *)envbuf);
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
457,
|
||||||
/**/
|
/**/
|
||||||
456,
|
456,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user