aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/globals.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-23 09:15:31 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-23 09:48:24 +0800
commit91c99eed540a329b7738bd2f28259f8ac0670ef2 (patch)
tree12e1583446b7c4ded682fdb083458ffb725def73 /src/nvim/globals.h
parented6bbc03af7be192e3d615f8ee761611e78d9881 (diff)
downloadrneovim-91c99eed540a329b7738bd2f28259f8ac0670ef2.tar.gz
rneovim-91c99eed540a329b7738bd2f28259f8ac0670ef2.tar.bz2
rneovim-91c99eed540a329b7738bd2f28259f8ac0670ef2.zip
vim-patch:8.2.4731: the changelist index is not remembered per buffer
Problem: The changelist index is not remembered per buffer. Solution: Keep the changelist index per window and buffer. (closes vim/vim#10135, closes vim/vim#2173) https://github.com/vim/vim/commit/db0ea7f2b00c84d84f188c9e9953c4f1887528e7 Cherry-pick FOR_ALL_BUF_WININFO from patch 8.2.0500. Cherry-pick test_changelist.vim change from patch 8.2.3795.
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r--src/nvim/globals.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index b585467bd0..9946085703 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -467,6 +467,9 @@ EXTERN buf_T *curbuf INIT(= NULL); // currently active buffer
#define FOR_ALL_BUFFERS_BACKWARDS(buf) \
for (buf_T *buf = lastbuf; buf != NULL; buf = buf->b_prev)
+#define FOR_ALL_BUF_WININFO(buf, wip) \
+ for ((wip) = (buf)->b_wininfo; (wip) != NULL; (wip) = (wip)->wi_next) // NOLINT
+
// Iterate through all the signs placed in a buffer
#define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
for ((sign) = (buf)->b_signlist; (sign) != NULL; (sign) = (sign)->se_next) // NOLINT