vim-patch:8.1.0892: failure when closing a window when location list is in use

Problem:    Failure when closing a window when location list is in use.
Solution:   Handle the situation gracefully. Make sure memory for 'switchbuf'
            is not freed at the wrong time. (Yegappan Lakshmanan,
            closes vim/vim#3928)
eeb1b9c7ed
This commit is contained in:
VVKot
2021-12-19 07:46:28 +00:00
committed by zeertzjq
parent 91ac0088e1
commit 6c26ab71ce
5 changed files with 75 additions and 41 deletions

View File

@@ -6436,7 +6436,7 @@ win_T *find_win_by_nr_or_id(typval_T *vp)
int nr = (int)tv_get_number_chk(vp, NULL);
if (nr >= LOWEST_WIN_ID) {
return win_id2wp(vp);
return win_id2wp(tv_get_number(vp));
}
return find_win_by_nr(vp, NULL);