aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-09-10 08:50:42 +0200
committerGitHub <noreply@github.com>2020-09-10 08:50:42 +0200
commit5581ac88c60b0a3f7595088b30a8621f280b5e4c (patch)
tree134b85598a37003b2339bc996f934759b826918f /src/nvim/api/buffer.c
parent0f41caa265602f8a6bc9f30f28d9f726699075cb (diff)
parentef5e7b862db38d3b0376417e137c6463c4d909e6 (diff)
downloadrneovim-5581ac88c60b0a3f7595088b30a8621f280b5e4c.tar.gz
rneovim-5581ac88c60b0a3f7595088b30a8621f280b5e4c.tar.bz2
rneovim-5581ac88c60b0a3f7595088b30a8621f280b5e4c.zip
Merge pull request #12568 from nvim-treesitter/bytetrack
Bytetrack
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 5290011325..ab768a1aef 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -175,8 +175,7 @@ Boolean nvim_buf_attach(uint64_t channel_id,
}
cb.on_lines = v->data.luaref;
v->data.luaref = LUA_NOREF;
- } else if (is_lua && strequal("_on_bytes", k.data)) {
- // NB: undocumented, untested and incomplete interface!
+ } else if (is_lua && strequal("on_bytes", k.data)) {
if (v->type != kObjectTypeLuaRef) {
api_set_error(err, kErrorTypeValidation, "callback is not a function");
goto error;
@@ -1796,6 +1795,7 @@ Dictionary nvim__buf_stats(Buffer buffer, Error *err)
// NB: this should be zero at any time API functions are called,
// this exists to debug issues
PUT(rv, "dirty_bytes", INTEGER_OBJ((Integer)buf->deleted_bytes));
+ PUT(rv, "dirty_bytes2", INTEGER_OBJ((Integer)buf->deleted_bytes2));
u_header_T *uhp = NULL;
if (buf->b_u_curhead != NULL) {