To: vim_dev@googlegroups.com Subject: Patch 8.2.0093 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0093 Problem: win_splitmove() can make Vim hang. Solution: Check windows exists in the current tab page. (closes #5444) Files: src/testdir/test_window_cmd.vim, src/evalwindow.c *** ../vim-8.2.0092/src/testdir/test_window_cmd.vim 2019-12-01 14:56:12.000000000 +0100 --- src/testdir/test_window_cmd.vim 2020-01-06 21:01:50.736697009 +0100 *************** *** 927,932 **** --- 927,936 ---- call assert_fails('call win_splitmove(winnr(), 123)', 'E957:') call assert_fails('call win_splitmove(123, winnr())', 'E957:') call assert_fails('call win_splitmove(winnr(), winnr())', 'E957:') + + tabnew + call assert_fails('call win_splitmove(1, win_getid(1, 1))', 'E957:') + tabclose endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.0092/src/evalwindow.c 2019-11-30 22:40:44.000000000 +0100 --- src/evalwindow.c 2020-01-06 20:57:20.309718457 +0100 *************** *** 808,814 **** wp = find_win_by_nr_or_id(&argvars[0]); targetwin = find_win_by_nr_or_id(&argvars[1]); ! if (wp == NULL || targetwin == NULL || wp == targetwin) { emsg(_(e_invalwindow)); rettv->vval.v_number = -1; --- 808,815 ---- wp = find_win_by_nr_or_id(&argvars[0]); 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; *** ../vim-8.2.0092/src/version.c 2020-01-06 20:09:09.996571770 +0100 --- src/version.c 2020-01-06 21:02:34.056651501 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 93, /**/ -- Every exit is an entrance into something else. /// 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 ///