To: vim_dev@googlegroups.com Subject: Patch 8.2.0422 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0422 Problem: Crash when passing popup window to win_splitmove(). (john Devin) Solution: Disallow moving a popup window. (closes #5816) Files: src/testdir/test_popupwin.vim, src/evalwindow.c *** ../vim-8.2.0421/src/testdir/test_popupwin.vim 2020-03-09 16:40:36.250782076 +0100 --- src/testdir/test_popupwin.vim 2020-03-20 21:14:49.010450118 +0100 *************** *** 3307,3310 **** --- 3307,3322 ---- 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 *** ../vim-8.2.0421/src/evalwindow.c 2020-02-14 14:32:15.966616351 +0100 --- src/evalwindow.c 2020-03-20 21:14:08.614562056 +0100 *************** *** 810,816 **** targetwin = find_win_by_nr_or_id(&argvars[1]); if (wp == NULL || targetwin == NULL || wp == targetwin ! || !win_valid(wp) || !win_valid(targetwin)) { emsg(_(e_invalwindow)); rettv->vval.v_number = -1; --- 810,817 ---- targetwin = find_win_by_nr_or_id(&argvars[1]); if (wp == NULL || targetwin == NULL || wp == targetwin ! || !win_valid(wp) || !win_valid(targetwin) ! || win_valid_popup(wp) || win_valid_popup(targetwin)) { emsg(_(e_invalwindow)); rettv->vval.v_number = -1; *** ../vim-8.2.0421/src/version.c 2020-03-20 20:48:45.563983163 +0100 --- src/version.c 2020-03-20 21:11:50.094949755 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 422, /**/ -- Luxury. We used to have to get out of the lake at three o'clock in the morning, clean the lake, eat a handful of hot gravel, go to work at the mill every day for tuppence a month, come home, and Dad would beat us around the head and neck with a broken bottle, if we were LUCKY! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///