diff options
author | 2010-06-12 18:45:14 -0400 | |
---|---|---|
committer | 2010-06-12 18:45:14 -0400 | |
commit | f0d698d2c478bf6222fda1ef2fe1fec8b339af93 (patch) | |
tree | 00f1b34eb3021460ec45556f2d9a817262a923c5 | |
parent | f0c0e4d8c11843fb6b5dc4c6f590fa25714ab949 (diff) | |
download | textadept-f0d698d2c478bf6222fda1ef2fe1fec8b339af93.tar.gz textadept-f0d698d2c478bf6222fda1ef2fe1fec8b339af93.zip |
Fixed bug with _BUFFERS and _VIEWS not being updated; src/lua_interface.c
Originally textadept.buffers and textadept.views were accessible through a
metatable that pointed to the most up-to-date table.
-rw-r--r-- | src/lua_interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 0003d702..1299d8ef 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -213,7 +213,9 @@ void l_remove_scintilla_window(GtkWidget *editor) { while (lua_next(lua, -2)) (editor != l_checkview(lua, -1)) ? l_append(lua, -4) : lua_pop(lua, 1); lua_pop(lua, 1); // views + lua_pushvalue(lua, -1); lua_setfield(lua, LUA_REGISTRYINDEX, "views"); + lua_setglobal(lua, "_VIEWS"); } /** @@ -328,7 +330,9 @@ void l_remove_scintilla_buffer(sptr_t doc) { while (lua_next(lua, -2)) (doc != l_checkdocpointer(lua, -1)) ? l_append(lua, -4) : lua_pop(lua, 1); lua_pop(lua, 1); // buffers + lua_pushvalue(lua, -1); lua_setfield(lua, LUA_REGISTRYINDEX, "buffers"); + lua_setglobal(lua, "_BUFFERS"); } /** |