aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-10 08:36:31 +0800
committerckelsel <ckelsel@hotmail.com>2017-08-10 08:53:22 +0800
commit4cd2749b102864a3e194b136cc88f4846b412dfe (patch)
tree808e632d9e6dee4306be134af28a9fd010d9a88f /src
parent085102fadf1c1371e863c0e9af8240038ce641e2 (diff)
downloadrneovim-4cd2749b102864a3e194b136cc88f4846b412dfe.tar.gz
rneovim-4cd2749b102864a3e194b136cc88f4846b412dfe.tar.bz2
rneovim-4cd2749b102864a3e194b136cc88f4846b412dfe.zip
vim-patch:8.0.0174
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) https://github.com/vim/vim/commit/b8f7bd68f6fdff51ca4db5b145dcde42ee7b804b
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds2.c25
-rw-r--r--src/nvim/version.c2
2 files changed, 16 insertions, 11 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index 1a728647ca..0fd74ccde7 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -3610,18 +3610,11 @@ void ex_language(exarg_T *eap)
static char_u **locales = NULL; // Array of all available locales
-static bool did_init_locales = false;
-/// 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 bool did_init_locales = false;
-// 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.
static char_u **find_locales(void)
{
@@ -3653,6 +3646,18 @@ static char_u **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)
void free_locales(void)
diff --git a/src/nvim/version.c b/src/nvim/version.c
index fa179b4f63..bc5035f215 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -778,7 +778,7 @@ static const int included_patches[] = {
177,
176,
// 175,
- // 174,
+ 174,
// 173 NA
172,
// 171,