Make sure window is still valid in the middle of calling :lopen (#14240)

Make sure that oldwin is not invalid after splitting

Revisit this when porting vim patch v8.1.0892 and related quickfix patches.
This commit is contained in:
Tony Chen
2021-03-29 05:19:59 -07:00
committed by GitHub
parent 8665a96b92
commit aa6adacd77
3 changed files with 26 additions and 0 deletions

View File

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