mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
refactor(lua): initialize lua state at startup instead of dynamically
lua is used as part of implementation for more core features. As an example, every user keypress will invoke a lua function to check for keypress handlers (regardless if they are registered or not). Thus not starting lua until it is first used doesn't make much sense anymore. nlua_enter was also needed due to the earlier stateful &rtp translation, which by now have been made stateless.
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
#include <msgpack.h>
|
||||
|
||||
#include "nvim/ascii.h"
|
||||
@@ -258,6 +256,8 @@ int main(int argc, char **argv)
|
||||
// Check if we have an interactive window.
|
||||
check_and_set_isatty(¶ms);
|
||||
|
||||
nlua_init();
|
||||
|
||||
// Process the command line arguments. File names are put in the global
|
||||
// argument list "global_alist".
|
||||
command_line_scan(¶ms);
|
||||
@@ -341,7 +341,6 @@ int main(int argc, char **argv)
|
||||
TIME_MSG("initialized screen early for UI");
|
||||
}
|
||||
|
||||
|
||||
// open terminals when opening files that start with term://
|
||||
#define PROTO "term://"
|
||||
do_cmdline_cmd("augroup nvim_terminal");
|
||||
|
Reference in New Issue
Block a user