summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evalwindow.c3
-rw-r--r--src/testdir/test_window_cmd.vim4
-rw-r--r--src/version.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index 34d202e0a..672bfc13c 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -808,7 +808,8 @@ f_win_splitmove(typval_T *argvars, typval_T *rettv)
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)
+ if (wp == NULL || targetwin == NULL || wp == targetwin
+ || !win_valid(wp) || !win_valid(targetwin))
{
emsg(_(e_invalwindow));
rettv->vval.v_number = -1;
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index d543ef7e6..87c1f1f25 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -927,6 +927,10 @@ func Test_win_splitmove()
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
diff --git a/src/version.c b/src/version.c
index 28590ad44..36dee83d2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 93,
+/**/
92,
/**/
91,