Mercurial > vim
comparison src/option.c @ 14997:0058cdd5b752 v8.1.0510
patch 8.1.0510: filter test fails when $LANG is C.UTF-8
commit https://github.com/vim/vim/commit/dcd71cbaedf75dd8e5c5a45c5c2e3ec7ee552dce
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 4 14:40:47 2018 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Nov 2018 14:45:06 +0100 |
parents | c5ec5ddbe814 |
children | 67e3103d6e18 |
comparison
equal
deleted
inserted
replaced
14996:44cb79f534cd | 14997:0058cdd5b752 |
---|---|
4254 p_hlg = vim_strsave(lang); | 4254 p_hlg = vim_strsave(lang); |
4255 if (p_hlg == NULL) | 4255 if (p_hlg == NULL) |
4256 p_hlg = empty_option; | 4256 p_hlg = empty_option; |
4257 else | 4257 else |
4258 { | 4258 { |
4259 /* zh_CN becomes "cn", zh_TW becomes "tw". */ | 4259 // zh_CN becomes "cn", zh_TW becomes "tw" |
4260 if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5) | 4260 if (STRNICMP(p_hlg, "zh_", 3) == 0 && STRLEN(p_hlg) >= 5) |
4261 { | 4261 { |
4262 p_hlg[0] = TOLOWER_ASC(p_hlg[3]); | 4262 p_hlg[0] = TOLOWER_ASC(p_hlg[3]); |
4263 p_hlg[1] = TOLOWER_ASC(p_hlg[4]); | 4263 p_hlg[1] = TOLOWER_ASC(p_hlg[4]); |
4264 } | |
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'; | |
4264 } | 4270 } |
4265 p_hlg[2] = NUL; | 4271 p_hlg[2] = NUL; |
4266 } | 4272 } |
4267 options[idx].flags |= P_ALLOCED; | 4273 options[idx].flags |= P_ALLOCED; |
4268 } | 4274 } |