vim-patch:9.1.0118: Use different restoration strategy in win_splitmove

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)

704966c254

Adjust winframe_restore to account for Nvim's horizontal separators when the
global statusline is in use. Add a test.
This commit is contained in:
Sean Dewar
2024-02-25 01:03:26 +00:00
parent 24dfa47e4f
commit 1c6b693ec1
4 changed files with 151 additions and 150 deletions

View File

@@ -57,7 +57,7 @@ win_T *win_new_float(win_T *wp, bool last, WinConfig fconfig, Error *err)
return NULL;
}
int dir;
winframe_remove(wp, &dir, NULL);
winframe_remove(wp, &dir, NULL, NULL);
XFREE_CLEAR(wp->w_frame);
win_comp_pos(); // recompute window positions
win_remove(wp, NULL);