0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.5035: when splitting a window the changelist position moves

Problem:    When splitting a window the changelist position moves.
Solution:   Set the changelist index a bit later. (closes #10493)
This commit is contained in:
zeertzjq
2022-05-28 10:49:44 +01:00
committed by Bram Moolenaar
parent 5a6ec10cc8
commit e6f13b473c
4 changed files with 41 additions and 28 deletions

View File

@@ -1354,9 +1354,6 @@ win_split_ins(
p_wh = size;
}
// Keep same changelist position in new window.
wp->w_changelistidx = oldwin->w_changelistidx;
/*
* make the new window the current window
*/
@@ -1431,6 +1428,10 @@ win_init(win_T *newp, win_T *oldp, int flags UNUSED)
}
newp->w_tagstackidx = oldp->w_tagstackidx;
newp->w_tagstacklen = oldp->w_tagstacklen;
// Keep same changelist position in new window.
newp->w_changelistidx = oldp->w_changelistidx;
#ifdef FEAT_FOLDING
copyFoldingState(oldp, newp);
#endif