summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-28 10:49:44 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-28 10:49:44 +0100
commite6f13b473cf2c270e4eab214e09be9825320c11b (patch)
tree3905eaf26b380ff2304fb3679280bd98fa01bdd1 /src/window.c
parent5a6ec10cc80ab02eeff644ab19b82312630ea855 (diff)
downloadvim-git-e6f13b473cf2c270e4eab214e09be9825320c11b.tar.gz
patch 8.2.5035: when splitting a window the changelist position movesv8.2.5035
Problem: When splitting a window the changelist position moves. Solution: Set the changelist index a bit later. (closes #10493)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index fa59ade4e..f2913d4a7 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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