mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.276
Problem: GvimExt sets $LANG in the wrong way. Solution: Save the environment and use it for gvim. (Yasuhiro Matsumoto)
This commit is contained in:
@@ -142,6 +142,7 @@ static char *null_libintl_bindtextdomain(const char *, const char *);
|
|||||||
static int dyn_libintl_init(char *dir);
|
static int dyn_libintl_init(char *dir);
|
||||||
static void dyn_libintl_end(void);
|
static void dyn_libintl_end(void);
|
||||||
|
|
||||||
|
static wchar_t *oldenv = NULL;
|
||||||
static HINSTANCE hLibintlDLL = 0;
|
static HINSTANCE hLibintlDLL = 0;
|
||||||
static char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
|
static char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
|
||||||
static char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
|
static char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain;
|
||||||
@@ -339,8 +340,10 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /* lpReserved */)
|
|||||||
inc_cRefThisDLL()
|
inc_cRefThisDLL()
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GETTEXT
|
#ifdef FEAT_GETTEXT
|
||||||
if (g_cRefThisDll == 0)
|
if (g_cRefThisDll == 0) {
|
||||||
dyn_gettext_load();
|
dyn_gettext_load();
|
||||||
|
oldenv = GetEnvironmentStringsW();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
InterlockedIncrement((LPLONG)&g_cRefThisDll);
|
InterlockedIncrement((LPLONG)&g_cRefThisDll);
|
||||||
}
|
}
|
||||||
@@ -349,8 +352,13 @@ inc_cRefThisDLL()
|
|||||||
dec_cRefThisDLL()
|
dec_cRefThisDLL()
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GETTEXT
|
#ifdef FEAT_GETTEXT
|
||||||
if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0)
|
if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) {
|
||||||
dyn_gettext_free();
|
dyn_gettext_free();
|
||||||
|
if (oldenv != NULL) {
|
||||||
|
FreeEnvironmentStringsW(oldenv);
|
||||||
|
oldenv = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
InterlockedDecrement((LPLONG)&g_cRefThisDll);
|
InterlockedDecrement((LPLONG)&g_cRefThisDll);
|
||||||
#endif
|
#endif
|
||||||
@@ -905,8 +913,8 @@ STDMETHODIMP CShellExt::InvokeGvim(HWND hParent,
|
|||||||
NULL, // Process handle not inheritable.
|
NULL, // Process handle not inheritable.
|
||||||
NULL, // Thread handle not inheritable.
|
NULL, // Thread handle not inheritable.
|
||||||
FALSE, // Set handle inheritance to FALSE.
|
FALSE, // Set handle inheritance to FALSE.
|
||||||
0, // No creation flags.
|
oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT,
|
||||||
NULL, // Use parent's environment block.
|
oldenv, // Use unmodified environment block.
|
||||||
NULL, // Use parent's starting directory.
|
NULL, // Use parent's starting directory.
|
||||||
&si, // Pointer to STARTUPINFO structure.
|
&si, // Pointer to STARTUPINFO structure.
|
||||||
&pi) // Pointer to PROCESS_INFORMATION structure.
|
&pi) // Pointer to PROCESS_INFORMATION structure.
|
||||||
@@ -987,8 +995,8 @@ STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
|
|||||||
NULL, // Process handle not inheritable.
|
NULL, // Process handle not inheritable.
|
||||||
NULL, // Thread handle not inheritable.
|
NULL, // Thread handle not inheritable.
|
||||||
FALSE, // Set handle inheritance to FALSE.
|
FALSE, // Set handle inheritance to FALSE.
|
||||||
0, // No creation flags.
|
oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT,
|
||||||
NULL, // Use parent's environment block.
|
oldenv, // Use unmodified environment block.
|
||||||
NULL, // Use parent's starting directory.
|
NULL, // Use parent's starting directory.
|
||||||
&si, // Pointer to STARTUPINFO structure.
|
&si, // Pointer to STARTUPINFO structure.
|
||||||
&pi) // Pointer to PROCESS_INFORMATION structure.
|
&pi) // Pointer to PROCESS_INFORMATION structure.
|
||||||
|
@@ -709,6 +709,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 */
|
||||||
|
/**/
|
||||||
|
276,
|
||||||
/**/
|
/**/
|
||||||
275,
|
275,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user