diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-23 09:15:31 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-23 09:48:24 +0800 |
commit | 91c99eed540a329b7738bd2f28259f8ac0670ef2 (patch) | |
tree | 12e1583446b7c4ded682fdb083458ffb725def73 /src/nvim/buffer.c | |
parent | ed6bbc03af7be192e3d615f8ee761611e78d9881 (diff) | |
download | rneovim-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/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 4830b200af..10ce893fe8 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2483,6 +2483,9 @@ void buflist_setfpos(buf_T *const buf, win_T *const win, linenr_T lnum, colnr_T wip->wi_mark.view = mark_view_make(win->w_topline, wip->wi_mark.mark); } } + if (win != NULL) { + wip->wi_changelistidx = win->w_changelistidx; + } if (copy_options && win != NULL) { // Save the window-specific option values. copy_winopt(&win->w_onebuf_opt, &wip->wi_opt); @@ -2586,6 +2589,9 @@ void 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; + } if (curwin->w_float_config.style == kWinStyleMinimal) { didset_window_options(curwin); |