aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_updates.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-22 08:35:28 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-06-22 08:35:28 +0200
commite1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1 (patch)
tree3bfaaf5fdba2d6c01288880f865620db1d6c1a88 /src/nvim/buffer_updates.c
parentb7514493a0c4a4389a5921f15b0b429dae5c75e7 (diff)
parenteaf2a25f12342622414b264870f41939fe41355a (diff)
downloadrneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.tar.gz
rneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.tar.bz2
rneovim-e1c6109e62b4e1d12ebdab67140f82cc7dc2c0d1.zip
Merge #8618 'Replace b_changedtick with always-inline functions'
Diffstat (limited to 'src/nvim/buffer_updates.c')
-rw-r--r--src/nvim/buffer_updates.c7
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);