Merge #22214 move init_default_autocmds to lua

This commit is contained in:
Justin M. Keyes
2023-02-14 19:13:12 -05:00
committed by GitHub
5 changed files with 26 additions and 36 deletions

View File

@@ -407,19 +407,16 @@ int main(int argc, char **argv)
open_script_files(&params);
// Default mappings (incl. menus)
// Default mappings (incl. menus) & autocommands
Error err = ERROR_INIT;
Object o = NLUA_EXEC_STATIC("return vim._init_default_mappings()",
Object o = NLUA_EXEC_STATIC("return vim._init_defaults()",
(Array)ARRAY_DICT_INIT, &err);
assert(!ERROR_SET(&err));
api_clear_error(&err);
assert(o.type == kObjectTypeNil);
api_free_object(o);
TIME_MSG("init default mappings");
init_default_autocmds();
TIME_MSG("init default autocommands");
TIME_MSG("init default mappings & autocommands");
bool vimrc_none = strequal(params.use_vimrc, "NONE");