aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/.textadept.lua7
-rw-r--r--src/lua_interface.c12
2 files changed, 1 insertions, 18 deletions
diff --git a/core/.textadept.lua b/core/.textadept.lua
index a37a892c..3a0442fa 100644
--- a/core/.textadept.lua
+++ b/core/.textadept.lua
@@ -69,16 +69,9 @@ function get_split_table() end
-- Otherwise a regular menu item with a mnemonic is created.
-- Submenus are just nested menu-structure tables. Their title text is defined
-- with a 'title' key.
--- @see popupmenu
function gtkmenu(menu_table) end
---
--- Pops up a GTK menu at the cursor.
--- @param menu The menu userdata returned by gtkmenu.
--- @see gtkmenu
-function popupmenu(menu) end
-
----
-- Resets the Lua state by reloading all init scripts.
-- Language-specific modules for opened files are NOT reloaded. Re-opening the
-- files that use them will reload those modules.
diff --git a/src/lua_interface.c b/src/lua_interface.c
index e50784dc..b6739c15 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -68,7 +68,6 @@ static int l_cf_ta_buffer_new(lua_State *lua),
l_cf_ta_goto_window(lua_State *lua),
l_cf_view_goto_buffer(lua_State *lua),
l_cf_ta_gtkmenu(lua_State *lua),
- l_cf_ta_popupmenu(lua_State *lua),
l_cf_ta_reset(lua_State *lua),
l_cf_ta_quit(lua_State *lua),
l_cf_pm_focus(lua_State *lua),
@@ -136,7 +135,6 @@ bool l_init(int argc, char **argv, bool reinit) {
l_cfunc(lua, l_cf_ta_goto_window, "goto_view");
l_cfunc(lua, l_cf_ta_get_split_table, "get_split_table");
l_cfunc(lua, l_cf_ta_gtkmenu, "gtkmenu");
- l_cfunc(lua, l_cf_ta_popupmenu, "popupmenu");
l_cfunc(lua, l_cf_ta_reset, "reset");
l_cfunc(lua, l_cf_ta_quit, "quit");
l_mt(lua, "_textadept_mt", l_ta_mt_index, l_ta_mt_newindex);
@@ -459,7 +457,7 @@ void l_set_buffer_global(ScintillaObject *sci) {
*/
void l_close() {
closing = true;
- while (unsplit_window(focused_editor));
+ while (unsplit_window(focused_editor)) ; // need space to fix compiler warning
lua_getfield(lua, LUA_REGISTRYINDEX, "buffers");
lua_pushnil(lua);
while (lua_next(lua, -2)) {
@@ -1461,14 +1459,6 @@ static int l_cf_ta_gtkmenu(lua_State *lua) {
return 1;
}
-static int l_cf_ta_popupmenu(lua_State *lua) {
- luaL_argcheck(lua, lua_isuserdata(lua, 1), 1, "gtkmenu expected");
- GtkWidget *menu = l_togtkwidget(lua, 1);
- gtk_widget_show_all(menu);
- gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, NULL);
- return 0;
-}
-
static int l_cf_ta_reset(lua_State *lua) {
l_handle_event("resetting");
l_init(0, NULL, true);