Problem: Crash when passing popup window to win_splitmove(). (john Devin)
Solution: Disallow moving a popup window. (closes #5816)
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_popup(wp) || win_valid_popup(targetwin))
{
emsg(_(e_invalwindow));
rettv->vval.v_number = -1;
set signcolumn&
endfunc
+func Test_popupwin_splitmove()
+ vsplit
+ let win2 = win_getid()
+ let popup_winid = popup_dialog('hello', {})
+ call assert_fails('call win_splitmove(popup_winid, win2)', 'E957:')
+ call assert_fails('call win_splitmove(win2, popup_winid)', 'E957:')
+
+ call popup_clear()
+ bwipe
+endfunc
+
+
" vim: shiftwidth=2 sts=2
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 422,
/**/
421,
/**/