]> granicus.if.org Git - vim/commitdiff
patch 8.0.0174: executing "locale -a" on MS-Windows needlessly v8.0.0174
authorBram Moolenaar <Bram@vim.org>
Thu, 12 Jan 2017 19:28:25 +0000 (20:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 12 Jan 2017 19:28:25 +0000 (20:28 +0100)
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)

src/ex_cmds2.c
src/version.c

index bee4670526f8781beff71a692630f9ac5c9f6690..7a6047a5bb725a79ed59bcafa302b5dcc4355558 100644 (file)
@@ -5091,23 +5091,9 @@ ex_language(exarg_T *eap)
 # if defined(FEAT_CMDL_COMPL) || defined(PROTO)
 
 static char_u  **locales = NULL;       /* Array of all available locales */
-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();
-    }
-}
+#  ifndef WIN32
+static int     did_init_locales = FALSE;
 
 /* Return an array of strings for all available locales + NULL for the
  * last element.  Return NULL in case of error. */
@@ -5149,6 +5135,22 @@ find_locales(void)
     ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
     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)
     void
index 638e350dcb8e60913d243a745fa0b35ac46aff6a..36f79b1b0331c94aed63e0084864701f5481fbb1 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    174,
 /**/
     173,
 /**/