0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 #10135,
            closes #2173)
This commit is contained in:
LemonBoy
2022-04-10 17:59:26 +01:00
committed by Bram Moolenaar
parent e08fde0073
commit db0ea7f2b0
5 changed files with 54 additions and 8 deletions

View File

@@ -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.