vim-patch:8.2.0422: crash when passing popup window to win_splitmove()

Problem:    Crash when passing popup window to win_splitmove(). (john Devin)
Solution:   Disallow moving a popup window. (closes vim/vim#5816)
0f1563ffee

Add translated test for 8.2.0422 (popup->floating)
This commit is contained in:
Andy K. Massimino
2021-03-18 22:40:18 -04:00
parent b2ec770070
commit 0cec2d39c9
3 changed files with 31 additions and 1 deletions

View File

@@ -4032,7 +4032,8 @@ static void f_win_splitmove(typval_T *argvars, typval_T *rettv, FunPtr fptr)
targetwin = find_win_by_nr_or_id(&argvars[1]);
if (wp == NULL || targetwin == NULL || wp == targetwin
|| !win_valid(wp) || !win_valid(targetwin)) {
|| !win_valid(wp) || !win_valid(targetwin)
|| win_valid_floating(wp) || win_valid_floating(targetwin)) {
EMSG(_(e_invalwindow));
rettv->vval.v_number = -1;
return;