|
The l_init function takes an additional reinit boolean as a result.
When resetting, the package.loaded and _G tables are cleared. Since the
textadept.buffers, textadept.views, and arg tables were originally in _G, they
were moved to the LUA_REGISTRYINDEX table so as not to be lost. They are still
available in _G, but as links to the tables in LUA_REGISTRYINDEX.
textadept.reset() sets a global RESETTING boolean to true when init.lua is
re-run so things like reloading a session or reloading files from the command
line do not occur. The boolean is set to nil afterwards.
|