mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
refactor(aucmd_win): remove need to restore window layout
There are some places that mess with the window layout in preparation for moving a window to a different split (win_split_ins called with new_wp != NULL). This means the window layout can change slightly even if win_split_ins fails. This is why it was still needed to restore the window layout in aucmd_{prep,rest}buf even if we disallow win_split_ins from making aucmd_win non-floating by moving it into a split. We can just skip messing with the layout in such places if we're dealing with the aucmd_win.
This commit is contained in:
@@ -4242,7 +4242,7 @@ static void win_move_into_split(win_T *wp, win_T *targetwin, int size, int flags
|
||||
int height = wp->w_height;
|
||||
win_T *oldwin = curwin;
|
||||
|
||||
if (wp == targetwin) {
|
||||
if (wp == targetwin || wp == aucmd_win) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user