diff --git a/src/ex_docmd.c b/src/ex_docmd.c index da499c9e4a..a2e53ad349 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -7347,6 +7347,11 @@ ex_winsize(exarg_T *eap) char_u *arg = eap->arg; char_u *p; + if (!isdigit(*arg)) + { + semsg(_(e_invarg2), arg); + return; + } w = getdigits(&arg); arg = skipwhite(arg); p = arg; diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim index 150e258ac7..f27b38562f 100644 --- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -327,6 +327,9 @@ endfunc " Test for the :winsize command func Test_winsize_cmd() call assert_fails('winsize 1', 'E465:') + call assert_fails('winsize 1 x', 'E465:') + call assert_fails('win_getid(1)', 'E475: Invalid argument: _getid(1)') + " Actually changing the window size would be flaky. endfunc " Test for the :redir command diff --git a/src/version.c b/src/version.c index e8c286b107..fb3a50ac6d 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2469, /**/ 2468, /**/