vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)

Problem:    The wininfo list may contain stale entries.
Solution:   When closing a window remove any other entry where the window
            pointer is NULL.
4882d98339
This commit is contained in:
Daniel Steinberg
2021-06-30 21:24:50 -04:00
committed by GitHub
parent d83bc835b6
commit 8bd6990084
3 changed files with 68 additions and 7 deletions

View File

@@ -840,11 +840,7 @@ static void clear_wininfo(buf_T *buf)
while (buf->b_wininfo != NULL) {
wip = buf->b_wininfo;
buf->b_wininfo = wip->wi_next;
if (wip->wi_optset) {
clear_winopt(&wip->wi_opt);
deleteFoldRecurse(buf, &wip->wi_folds);
}
xfree(wip);
free_wininfo(wip, buf);
}
}