fix(win_split_ins): do not fail when oldwin is not valid

Ref #14240
This commit is contained in:
zeertzjq
2022-02-14 20:40:58 +08:00
parent d33aebb821
commit 0cf2dc63bf
2 changed files with 3 additions and 14 deletions

View File

@@ -1420,13 +1420,11 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
p_wh = i;
}
if (!win_valid(oldwin)) {
return FAIL;
if (win_valid(oldwin)) {
// Send the window positions to the UI
oldwin->w_pos_changed = true;
}
// Send the window positions to the UI
oldwin->w_pos_changed = true;
return OK;
}