aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-07 07:57:50 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-07 07:57:50 +0100
commit35d594616515a5c4b40cb8a6dc004ddaa490bee2 (patch)
treebd1f022314f73717864f506fa1e19d1ae205ad70
parente5a5328df340f21d28f4885e1d39cffdaa0cb4fe (diff)
downloadvis-35d594616515a5c4b40cb8a6dc004ddaa490bee2.tar.gz
vis-35d594616515a5c4b40cb8a6dc004ddaa490bee2.tar.xz
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.
-rw-r--r--vis-lua.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/vis-lua.c b/vis-lua.c
index 2186e45..0590f55 100644
--- a/vis-lua.c
+++ b/vis-lua.c
@@ -765,25 +765,6 @@ static int message(lua_State *L) {
}
/***
- * 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
* @tparam string name the name of the action, can be referred to in key bindings as `<name>` pseudo key
@@ -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 },