summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-04-10 17:59:26 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-10 17:59:26 +0100
commitdb0ea7f2b00c84d84f188c9e9953c4f1887528e7 (patch)
tree3e51f520d137d74254d1b78d64d9a0c0b057714e /src/buffer.c
parente08fde007308fffec818b4ad6eccf573f54bed5b (diff)
patch 8.2.4731: the changelist index is not remembered per bufferv8.2.4731
Problem: The changelist index is not remembered per buffer. Solution: Keep the changelist index per window and buffer. (closes #10135, closes #2173)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5f8b1ad1dc..50aa9e8cc1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3076,6 +3076,8 @@ buflist_setfpos(
wip->wi_fpos.lnum = lnum;
wip->wi_fpos.col = col;
}
+ if (win != NULL)
+ wip->wi_changelistidx = win->w_changelistidx;
if (copy_options && win != NULL)
{
// Save the window-specific option values.
@@ -3210,6 +3212,8 @@ get_winopts(buf_T *buf)
}
else
copy_winopt(&curwin->w_allbuf_opt, &curwin->w_onebuf_opt);
+ if (wip != NULL)
+ curwin->w_changelistidx = wip->wi_changelistidx;
#ifdef FEAT_FOLDING
// Set 'foldlevel' to 'foldlevelstart' if it's not negative.