aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_updates.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-10 07:58:58 +0800
committerGitHub <noreply@github.com>2022-05-10 07:58:58 +0800
commit9aa5647e686e5420e5b9b51828ec7d55631f98ed (patch)
tree81172459aa5b8ac5c1f2e4e0b322e70267712ecd /src/nvim/buffer_updates.c
parentc55867b46d6758c4ff2e55d1bfb4cfc163182a12 (diff)
downloadrneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.gz
rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.bz2
rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.zip
vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
Diffstat (limited to 'src/nvim/buffer_updates.c')
-rw-r--r--src/nvim/buffer_updates.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c
index 3e2d04b3a2..57f052ced0 100644
--- a/src/nvim/buffer_updates.c
+++ b/src/nvim/buffer_updates.c
@@ -254,7 +254,7 @@ void buf_updates_send_changes(buf_T *buf, linenr_T firstline, int64_t num_added,
for (size_t i = 0; i < kv_size(buf->update_callbacks); i++) {
BufUpdateCallbacks cb = kv_A(buf->update_callbacks, i);
bool keep = true;
- if (cb.on_lines != LUA_NOREF && (cb.preview || !(State & CMDPREVIEW))) {
+ if (cb.on_lines != LUA_NOREF && (cb.preview || !(State & MODE_CMDPREVIEW))) {
Array args = ARRAY_DICT_INIT;
Object items[8];
args.size = 6; // may be increased to 8 below
@@ -313,7 +313,7 @@ void buf_updates_send_splice(buf_T *buf, int start_row, colnr_T start_col, bcoun
for (size_t i = 0; i < kv_size(buf->update_callbacks); i++) {
BufUpdateCallbacks cb = kv_A(buf->update_callbacks, i);
bool keep = true;
- if (cb.on_bytes != LUA_NOREF && (cb.preview || !(State & CMDPREVIEW))) {
+ if (cb.on_bytes != LUA_NOREF && (cb.preview || !(State & MODE_CMDPREVIEW))) {
FIXED_TEMP_ARRAY(args, 11);
// the first argument is always the buffer handle