From 35d594616515a5c4b40cb8a6dc004ddaa490bee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 7 Mar 2017 07:57:50 +0100 Subject: vis-lua: remove vis:open method The same functionality is available using vis:command and :open. If we decide a distinct API is useful, we should probably also provide a corresponding close method. --- vis-lua.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index 2186e45..0590f55 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -764,25 +764,6 @@ static int message(lua_State *L) { return 0; } -/*** - * Open a file. - * - * Creates a new window and loads the given file. - * - * @function open - * @tparam string filename the file name to load - * @treturn File the file object representing the new file, or `nil` on failure - */ -static int open(lua_State *L) { - Vis *vis = obj_ref_check(L, 1, "vis"); - const char *name = luaL_checkstring(L, 2); - if (vis_window_new(vis, name)) - obj_ref_new(L, vis->win->file, VIS_LUA_TYPE_FILE); - else - lua_pushnil(L); - return 1; -} - /*** * Register a Lua function as key action. * @function action_register @@ -1247,7 +1228,6 @@ static const struct luaL_Reg vis_lua[] = { { "command", command }, { "info", info }, { "message", message }, - { "open", open }, { "map", map }, { "motion", motion }, { "motion_register", motion_register }, -- cgit v1.2.3