mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.0174: executing "locale -a" on MS-Windows needlessly
Problem: For completion "locale -a" is executed on MS-Windows, even though it most likely won't work. Solution: Skip executing "locale -a" on MS-Windows. (Ken Takata)
This commit is contained in:
@@ -5091,24 +5091,10 @@ ex_language(exarg_T *eap)
|
|||||||
# if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
# if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
||||||
|
|
||||||
static char_u **locales = NULL; /* Array of all available locales */
|
static char_u **locales = NULL; /* Array of all available locales */
|
||||||
|
|
||||||
|
# ifndef WIN32
|
||||||
static int did_init_locales = FALSE;
|
static int did_init_locales = FALSE;
|
||||||
|
|
||||||
static void init_locales(void);
|
|
||||||
static char_u **find_locales(void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Lazy initialization of all available locales.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
init_locales(void)
|
|
||||||
{
|
|
||||||
if (!did_init_locales)
|
|
||||||
{
|
|
||||||
did_init_locales = TRUE;
|
|
||||||
locales = find_locales();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return an array of strings for all available locales + NULL for the
|
/* Return an array of strings for all available locales + NULL for the
|
||||||
* last element. Return NULL in case of error. */
|
* last element. Return NULL in case of error. */
|
||||||
static char_u **
|
static char_u **
|
||||||
@@ -5149,6 +5135,22 @@ find_locales(void)
|
|||||||
((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
|
((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
|
||||||
return (char_u **)locales_ga.ga_data;
|
return (char_u **)locales_ga.ga_data;
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lazy initialization of all available locales.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
init_locales(void)
|
||||||
|
{
|
||||||
|
# ifndef WIN32
|
||||||
|
if (!did_init_locales)
|
||||||
|
{
|
||||||
|
did_init_locales = TRUE;
|
||||||
|
locales = find_locales();
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
# if defined(EXITFREE) || defined(PROTO)
|
# if defined(EXITFREE) || defined(PROTO)
|
||||||
void
|
void
|
||||||
|
@@ -764,6 +764,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 */
|
||||||
|
/**/
|
||||||
|
174,
|
||||||
/**/
|
/**/
|
||||||
173,
|
173,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user