mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.2469: confusing error if :winsize has a wrong argument
Problem: Confusing error if :winsize has a wrong argument. Solution: Quote the argument in the error. (closes #2523)
This commit is contained in:
parent
038e09ee76
commit
f5a5116a96
@ -7347,6 +7347,11 @@ ex_winsize(exarg_T *eap)
|
|||||||
char_u *arg = eap->arg;
|
char_u *arg = eap->arg;
|
||||||
char_u *p;
|
char_u *p;
|
||||||
|
|
||||||
|
if (!isdigit(*arg))
|
||||||
|
{
|
||||||
|
semsg(_(e_invarg2), arg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
w = getdigits(&arg);
|
w = getdigits(&arg);
|
||||||
arg = skipwhite(arg);
|
arg = skipwhite(arg);
|
||||||
p = arg;
|
p = arg;
|
||||||
|
@ -327,6 +327,9 @@ endfunc
|
|||||||
" Test for the :winsize command
|
" Test for the :winsize command
|
||||||
func Test_winsize_cmd()
|
func Test_winsize_cmd()
|
||||||
call assert_fails('winsize 1', 'E465:')
|
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
|
endfunc
|
||||||
|
|
||||||
" Test for the :redir command
|
" Test for the :redir command
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2469,
|
||||||
/**/
|
/**/
|
||||||
2468,
|
2468,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user