Merge pull request #39074 from bfredl/retromania

build(zig): run oldtests in zig builds (RETROMANIA HYPERDRIVE)
This commit is contained in:
bfredl
2026-06-02 12:34:40 +02:00
committed by GitHub
10 changed files with 208 additions and 18 deletions

View File

@@ -212,9 +212,7 @@ void eval_clear(void)
{
evalvars_clear();
free_scriptnames(); // must come after evalvars_clear().
# ifdef HAVE_WORKING_LIBINTL
free_locales();
# endif
// autoloaded script names
free_autoload_scriptnames();

View File

@@ -338,8 +338,15 @@ char *get_locales(expand_T *xp, int idx)
void lang_init(void)
{
#if defined(__APPLE__) && !defined(ZIG_BUILD)
#if defined(__APPLE__)
if (!os_env_exists("LANG", true)) {
# if defined(ZIG_BUILD)
// fuck it just use the objectively correct values:
os_setenv("LANG", "C.UTF-8", true);
setlocale(LC_ALL, "C.UTF-8");
// Make sure strtod() uses a decimal point, not a comma.
setlocale(LC_NUMERIC, "C");
# else
char buf[50] = { 0 };
// $LANG is not set, either because it was unset or Nvim was started
@@ -358,6 +365,7 @@ void lang_init(void)
} else {
ELOG("$LANG is empty and the macOS primary language cannot be inferred.");
}
# endif
}
#endif
}

View File

@@ -1789,7 +1789,7 @@ static idx_T read_tree_node(FILE *fd, uint8_t *byts, idx_T *idxs, int maxidx, id
c = (getc(fd) << 16) + c; // <region>
}
if (c & WF_AFX) {
c = (getc(fd) << 24) + c; // <affixID>
c = (int)((unsigned)getc(fd) << 24) + c; // <affixID>
}
}

View File

@@ -77,9 +77,7 @@ static const char *command_complete[] = {
[EXPAND_HIGHLIGHT] = "highlight",
[EXPAND_HISTORY] = "history",
[EXPAND_KEYMAP] = "keymap",
#ifdef HAVE_WORKING_LIBINTL
[EXPAND_LOCALES] = "locale",
#endif
[EXPAND_LUA] = "lua",
[EXPAND_MAPCLEAR] = "mapclear",
[EXPAND_MAPPINGS] = "mapping",