]> granicus.if.org Git - vim/commitdiff
patch 8.1.0510: filter test fails when $LANG is C.UTF-8 v8.1.0510
authorBram Moolenaar <Bram@vim.org>
Sun, 4 Nov 2018 13:40:47 +0000 (14:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 4 Nov 2018 13:40:47 +0000 (14:40 +0100)
Problem:    Filter test fails when $LANG is C.UTF-8.
Solution:   Set 'helplang' to "en" for any C language. (Christian Brabandt,
            closes #3577)

src/option.c
src/version.c

index f238abe84fcfe7e3aaf762414759a9759b19e04d..3c54ab6422eecd7eefaca06202a7441d4cc2f767 100644 (file)
@@ -4256,12 +4256,18 @@ set_helplang_default(char_u *lang)
            p_hlg = empty_option;
        else
        {
-           /* zh_CN becomes "cn", zh_TW becomes "tw". */
+           // zh_CN becomes "cn", zh_TW becomes "tw"
            if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5)
            {
                p_hlg[0] = TOLOWER_ASC(p_hlg[3]);
                p_hlg[1] = TOLOWER_ASC(p_hlg[4]);
            }
+           // any C like setting, such as C.UTF-8, becomes "en"
+           else if (STRLEN(p_hlg) >= 1 && *p_hlg == 'C')
+           {
+               p_hlg[0] = 'e';
+               p_hlg[1] = 'n';
+           }
            p_hlg[2] = NUL;
        }
        options[idx].flags |= P_ALLOCED;
index fb8a16dc2de3be1f87605cd0c18508aa2ecb97b4..a5b6d877b86a7143351c8ce7932c874c1957a69f 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    510,
 /**/
     509,
 /**/