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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202001062023.006KN2a8018592%40masaka.moolenaar.net.