diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-21 22:25:58 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-22 00:05:31 +0200 |
| commit | bff2afbf1dc4b302f600e56d46cb413f1c31be3c (patch) | |
| tree | f5cf81c30e5e87cba9e02f6747f179fe0ad24eba | |
| parent | a3a72bf147c9abaa54969bcb0024a3b6592d1c0f (diff) | |
| download | vis-bff2afbf1dc4b302f600e56d46cb413f1c31be3c.tar.gz vis-bff2afbf1dc4b302f600e56d46cb413f1c31be3c.tar.xz | |
vis-lua: add vis.recording property
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | vis-lua.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -601,6 +601,7 @@ At this time there exists no API stability guarantees. - `command_register(name, function(argv, force, win, cursor, range))` hook up a Lua function to `:name` command - `map(mode, key, function)` map a Lua function to `key` in `mode` - `feedkeys(keys)` interpret `keys` as if they were read from the keyboard. If called from a key handling function, the keys will only be processed *after* the current key handling function has returned. + - `recording` boolean property, indicates whether a macro is currently being recorded - `file` - `content(pos, len)` or `content({start, finish})` - `insert(pos, data)` @@ -556,6 +556,10 @@ static int vis_index(lua_State *L) { return 1; } + if (strcmp(key, "recording") == 0) { + lua_pushboolean(L, vis_macro_recording(vis)); + return 1; + } } return index_common(L); |
