aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2017-11-12 22:10:53 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2017-11-12 22:10:53 -0500
commitda9fb004a0ef7b39624e3bc732b6a2439591d80d (patch)
tree8d79751b383f0f77ce7e13c86bf8202b5b897df4 /src/textadept.c
parent64cb1a3dad7f940970c74f2f98492565aeb9fc17 (diff)
downloadtextadept-da9fb004a0ef7b39624e3bc732b6a2439591d80d.tar.gz
textadept-da9fb004a0ef7b39624e3bc732b6a2439591d80d.zip
Buffer settings on startup apply to subsequent buffers.
As a result, no need for a *properties.lua* file anymore. Also, renamed `ui.set_theme()` to `buffer.set_theme()`.
Diffstat (limited to 'src/textadept.c')
-rw-r--r--src/textadept.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 73fd9591..9b16bf9d 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1521,10 +1521,10 @@ static int lL_init(lua_State *L, int argc, char **argv, int reinit) {
lua_setfield(L, LUA_REGISTRYINDEX, "ta_arg");
lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "ta_buffers");
lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "ta_views");
- } else { // clear package.loaded and _G
- lua_getglobal(L, "package"), lua_getfield(L, -1, "loaded");
+ } else { // clear _LOADED and _G
+ lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED");
lL_cleartable(L, lua_gettop(L));
- lua_pop(L, 2); // package.loaded and package
+ lua_pop(L, 1); // _LOADED
#if LUA_VERSION_NUM >= 502
lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS);
lL_cleartable(L, lua_gettop(L));