diff options
author | ZyX <kp-pav@yandex.ru> | 2018-06-22 00:44:31 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-06-22 00:44:31 +0300 |
commit | eaf2a25f12342622414b264870f41939fe41355a (patch) | |
tree | e2378deecf6863a10c19a4a36480d2ffa1716b5a /src/nvim/buffer_updates.c | |
parent | cf659a19260aea27816575d67a12139ebaada56f (diff) | |
download | rneovim-eaf2a25f12342622414b264870f41939fe41355a.tar.gz rneovim-eaf2a25f12342622414b264870f41939fe41355a.tar.bz2 rneovim-eaf2a25f12342622414b264870f41939fe41355a.zip |
*: Replace b_changedtick with new always-inline functions
Ref #8474
Diffstat (limited to 'src/nvim/buffer_updates.c')
-rw-r--r-- | src/nvim/buffer_updates.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c index c1b2828666..18b53a0685 100644 --- a/src/nvim/buffer_updates.c +++ b/src/nvim/buffer_updates.c @@ -6,6 +6,7 @@ #include "nvim/api/private/helpers.h" #include "nvim/msgpack_rpc/channel.h" #include "nvim/assert.h" +#include "nvim/buffer.h" // Register a channel. Return True if the channel was added, or already added. // Return False if the channel couldn't be added because the buffer is @@ -38,7 +39,7 @@ bool buf_updates_register(buf_T *buf, uint64_t channel_id, bool send_buffer) // the first argument is always the buffer handle args.items[0] = BUFFER_OBJ(buf->handle); - args.items[1] = INTEGER_OBJ(buf->b_changedtick); + args.items[1] = INTEGER_OBJ(buf_get_changedtick(buf)); // the first line that changed (zero-indexed) args.items[2] = INTEGER_OBJ(0); // the last line that was changed @@ -148,7 +149,7 @@ void buf_updates_send_changes(buf_T *buf, args.items[0] = BUFFER_OBJ(buf->handle); // next argument is b:changedtick - args.items[1] = send_tick ? INTEGER_OBJ(buf->b_changedtick) : NIL; + args.items[1] = send_tick ? INTEGER_OBJ(buf_get_changedtick(buf)) : NIL; // the first line that changed (zero-indexed) args.items[2] = INTEGER_OBJ(firstline - 1); @@ -203,7 +204,7 @@ void buf_updates_changedtick_single(buf_T *buf, uint64_t channel_id) args.items[0] = BUFFER_OBJ(buf->handle); // next argument is b:changedtick - args.items[1] = INTEGER_OBJ(buf->b_changedtick); + args.items[1] = INTEGER_OBJ(buf_get_changedtick(buf)); // don't try and clean up dead channels here rpc_send_event(channel_id, "nvim_buf_changedtick_event", args); |