Skip to content

Commit dcd71cb

Browse files
committed
patch 8.1.0510: filter test fails when $LANG is C.UTF-8
Problem: Filter test fails when $LANG is C.UTF-8. Solution: Set 'helplang' to "en" for any C language. (Christian Brabandt, closes #3577)
1 parent 0b38f54 commit dcd71cb

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/option.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4256,12 +4256,18 @@ set_helplang_default(char_u *lang)
42564256
p_hlg = empty_option;
42574257
else
42584258
{
4259-
/* zh_CN becomes "cn", zh_TW becomes "tw". */
4259+
// zh_CN becomes "cn", zh_TW becomes "tw"
42604260
if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5)
42614261
{
42624262
p_hlg[0] = TOLOWER_ASC(p_hlg[3]);
42634263
p_hlg[1] = TOLOWER_ASC(p_hlg[4]);
42644264
}
4265+
// any C like setting, such as C.UTF-8, becomes "en"
4266+
else if (STRLEN(p_hlg) >= 1 && *p_hlg == 'C')
4267+
{
4268+
p_hlg[0] = 'e';
4269+
p_hlg[1] = 'n';
4270+
}
42654271
p_hlg[2] = NUL;
42664272
}
42674273
options[idx].flags |= P_ALLOCED;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
510,
795797
/**/
796798
509,
797799
/**/

0 commit comments

Comments
 (0)