]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.457 v7.3.457
authorBram Moolenaar <Bram@vim.org>
Wed, 29 Feb 2012 12:49:09 +0000 (13:49 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 29 Feb 2012 12:49:09 +0000 (13:49 +0100)
Problem:    When setting $VIMRUNTIME later the directory for fetching
            translated messages is not adjusted.
Solution:   Put bindtextdomain() in vim_setenv().

src/misc1.c
src/version.c

index 1945d0ac9b42485973df08027f121ffd941cab63..cc29239086282e45c4ce81fdb0e1b86a45da9bc5 100644 (file)
@@ -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)
index f47e7bd16a7d9ddfdec3ff3e0c60c3aa79079cef..83965f44e2a7f0b2bb1dad365bb845167d6c0c37 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    457,
 /**/
     456,
 /**/