summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
authorSean Dewar <6256228+seandewar@users.noreply.github.com>2024-02-20 22:00:33 +0100
committerChristian Brabandt <cb@256bit.org>2024-02-20 22:00:33 +0100
commit704966c2545897dfcf426dd9ef946aeb6fa80c38 (patch)
treea885bfc35d182242ca75d1a000638e97b72d6f08 /src/autocmd.c
parent96cc4aef3d47d0fd70e68908af3d48a0dce8ea70 (diff)
patch 9.1.0118: Use different restoration strategy in win_splitmovev9.1.0118
Problem: saving and restoring all frames to split-move is overkill now that WinNewPre is not fired when split-moving. Solution: defer the flattening of frames until win_split_ins begins reorganising them, and attempt to restore the layout by undoing our changes. (Sean Dewar) This also means we no longer must allocate. related: #14042 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 41a46958e5..8e43b34473 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -1607,7 +1607,7 @@ aucmd_prepbuf(
p_acd = FALSE;
#endif
- (void)win_split_ins(0, WSP_TOP | WSP_FORCE_ROOM, auc_win, 0);
+ (void)win_split_ins(0, WSP_TOP | WSP_FORCE_ROOM, auc_win, 0, NULL);
(void)win_comp_pos(); // recompute window positions
p_ea = save_ea;
#ifdef FEAT_AUTOCHDIR
@@ -1670,7 +1670,7 @@ win_found:
stop_insert_mode = save_stop_insert_mode;
#endif
// Remove the window and frame from the tree of frames.
- (void)winframe_remove(curwin, &dummy, NULL);
+ (void)winframe_remove(curwin, &dummy, NULL, NULL);
win_remove(curwin, NULL);
// The window is marked as not used, but it is not freed, it can be