aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-02-03 16:45:32 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2008-02-03 16:45:32 -0500
commit655d3222b8e242bcdb96e9458dc311aee1a658e5 (patch)
tree9f1d643b137e2ea967ffad5ce16aad7fa8f9f1bb /core
parentbc000dc1ea565efb81a2a3d4b7e6aa41c376c0fb (diff)
downloadtextadept-655d3222b8e242bcdb96e9458dc311aee1a658e5.tar.gz
textadept-655d3222b8e242bcdb96e9458dc311aee1a658e5.zip
Added textadept.reset() function for resetting the Lua state.
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.
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions