Merge #10098 'win: fix msg_puts_printf()'

This commit is contained in:
Justin M. Keyes
2019-08-12 02:42:13 +02:00
12 changed files with 127 additions and 133 deletions

View File

@@ -2819,10 +2819,10 @@ void ex_packadd(exarg_T *eap)
/// ":options"
void ex_options(exarg_T *eap)
{
vim_setenv("OPTWIN_CMD", cmdmod.tab ? "tab" : "");
vim_setenv("OPTWIN_CMD",
cmdmod.tab ? "tab" :
(cmdmod.split & WSP_VERT) ? "vert" : "");
os_setenv("OPTWIN_CMD", cmdmod.tab ? "tab" : "", 1);
os_setenv("OPTWIN_CMD",
cmdmod.tab ? "tab" :
(cmdmod.split & WSP_VERT) ? "vert" : "", 1);
cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
}
@@ -3927,19 +3927,19 @@ void ex_language(exarg_T *eap)
_nl_msg_cat_cntr++;
#endif
// Reset $LC_ALL, otherwise it would overrule everything.
vim_setenv("LC_ALL", "");
os_setenv("LC_ALL", "", 1);
if (what != LC_TIME) {
// Tell gettext() what to translate to. It apparently doesn't
// use the currently effective locale.
if (what == LC_ALL) {
vim_setenv("LANG", (char *)name);
os_setenv("LANG", (char *)name, 1);
// Clear $LANGUAGE because GNU gettext uses it.
vim_setenv("LANGUAGE", "");
os_setenv("LANGUAGE", "", 1);
}
if (what != LC_CTYPE) {
vim_setenv("LC_MESSAGES", (char *)name);
os_setenv("LC_MESSAGES", (char *)name, 1);
set_helplang_default((char *)name);
}
}