diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-25 21:49:22 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-25 21:49:22 +0100 |
| commit | 36626ece88fbda61a9f711c34dabbcd66416d5cc (patch) | |
| tree | 945912e3352be6b6b26d707690c843ec369d82f9 /vis-lua.c | |
| parent | 9308e373844377f0db1f4f0d24d963dbd67c63ba (diff) | |
| parent | 9454d90081d4d55c5c6b1384992dd58614e2d150 (diff) | |
| download | vis-36626ece88fbda61a9f711c34dabbcd66416d5cc.tar.gz vis-36626ece88fbda61a9f711c34dabbcd66416d5cc.tar.xz | |
Merge branch 'master' of https://github.com/joshaw/vis
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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"); |
