From e6f13b473cf2c270e4eab214e09be9825320c11b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 28 May 2022 10:49:44 +0100 Subject: 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) --- src/window.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/window.c') 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 -- cgit v1.2.1