Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/joshaw/vis
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Mar 25, 2017
2 parents 9308e37 + 9454d90 commit 36626ec
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vis-lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,16 @@ static bool command_lua(Vis *vis, Win *win, void *data, bool force, const char *
* @tparam[opt] string help the single line help text as displayed in `:help`
* @treturn bool whether the command has been successfully registered
* @usage
* TODO
* vis:command_register("foo", function(argv, force, win, cursor, range)
* for i,arg in ipairs(argv) do
* print(i..": "..arg)
* end
* print("was command forced with ! "..(force and "yes" or "no"))
* print(win.file.name)
* print(cursor.pos)
* print(range ~= nil and ('['..range.start..', '..range.finish..']') or "invalid range")
* return true;
* end)
*/
static int command_register(lua_State *L) {
Vis *vis = obj_ref_check(L, 1, "vis");
Expand Down

0 comments on commit 36626ec

Please sign in to comment.