aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-06-24 15:33:41 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-06-24 15:33:41 -0400
commit8527adcebc33243664bcb2b19d63ac6a66e584be (patch)
treec0dae28fa47a8b0178420f4d65a44842d1e2a204 /src/textadept.c
parent9eac2fc9173845e73c8e55aec9be66c9a233da2d (diff)
downloadtextadept-8527adcebc33243664bcb2b19d63ac6a66e584be.tar.gz
textadept-8527adcebc33243664bcb2b19d63ac6a66e584be.zip
Removed `_G.RESETTING`; test for `arg` instead.
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 270adc89..644af3f3 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1378,11 +1378,11 @@ static int lL_dofile(lua_State *L, const char *filename) {
static int lreset(lua_State *L) {
lL_event(L, "reset_before", -1);
lL_init(L, 0, NULL, TRUE);
- lua_pushboolean(L, TRUE), lua_setglobal(L, "RESETTING");
l_setglobalview(L, focused_view);
l_setglobaldoc(L, SS(focused_view, SCI_GETDOCPOINTER, 0, 0));
+ lua_pushnil(L), lua_setglobal(L, "arg");
lL_dofile(L, "init.lua");
- lua_pushnil(L), lua_setglobal(L, "RESETTING");
+ lua_getfield(L, LUA_REGISTRYINDEX, "ta_arg"), lua_setglobal(L, "arg");
lL_event(L, "reset_after", -1);
return 0;
}