diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2019-12-22 13:47:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-22 13:47:45 +0100 |
| commit | 9e9dcd4bd79cc5ea0fd240bcb242ceea07deabe2 (patch) | |
| tree | b4c06d6b6485f364f502b97d8775546a9fced24f /src/nvim/buffer_updates.c | |
| parent | e1d63c180cc38cec5a8bf3e543bfe18472352da4 (diff) | |
| parent | 440695c29696f261337227e5c419aa1cf313c2dd (diff) | |
| download | rneovim-9e9dcd4bd79cc5ea0fd240bcb242ceea07deabe2.tar.gz rneovim-9e9dcd4bd79cc5ea0fd240bcb242ceea07deabe2.tar.bz2 rneovim-9e9dcd4bd79cc5ea0fd240bcb242ceea07deabe2.zip | |
Merge pull request #11113 from bfredl/tree-sitter-query
tree-sitter step 2: query API and highlighting prototype
Diffstat (limited to 'src/nvim/buffer_updates.c')
| -rw-r--r-- | src/nvim/buffer_updates.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c index 3604578b50..d12527d6ac 100644 --- a/src/nvim/buffer_updates.c +++ b/src/nvim/buffer_updates.c @@ -157,7 +157,7 @@ void buf_updates_unregister_all(buf_T *buf) args.items[0] = BUFFER_OBJ(buf->handle); textlock++; - executor_exec_lua_cb(cb.on_detach, "detach", args, false); + executor_exec_lua_cb(cb.on_detach, "detach", args, false, NULL); textlock--; } free_update_callbacks(cb); @@ -265,7 +265,7 @@ void buf_updates_send_changes(buf_T *buf, args.items[7] = INTEGER_OBJ((Integer)deleted_codeunits); } textlock++; - Object res = executor_exec_lua_cb(cb.on_lines, "lines", args, true); + Object res = executor_exec_lua_cb(cb.on_lines, "lines", args, true, NULL); textlock--; if (res.type == kObjectTypeBoolean && res.data.boolean == true) { @@ -293,10 +293,7 @@ void buf_updates_changedtick(buf_T *buf) BufUpdateCallbacks cb = kv_A(buf->update_callbacks, i); bool keep = true; if (cb.on_changedtick != LUA_NOREF) { - Array args = ARRAY_DICT_INIT; - Object items[2]; - args.size = 2; - args.items = items; + FIXED_TEMP_ARRAY(args, 2); // the first argument is always the buffer handle args.items[0] = BUFFER_OBJ(buf->handle); @@ -306,7 +303,7 @@ void buf_updates_changedtick(buf_T *buf) textlock++; Object res = executor_exec_lua_cb(cb.on_changedtick, "changedtick", - args, true); + args, true, NULL); textlock--; if (res.type == kObjectTypeBoolean && res.data.boolean == true) { |