Problem: Wrong argument for append() gives two error messages.
Solution: When getting an error for a number argument don't try using it as
a string. (closes #11335)
" Using $ instead of '$' must give an error
call assert_fails("call append($, 'foobar')", 'E116:')
+
+ call assert_fails("call append({}, '')", ['E728:', 'E728:'])
endfunc
" Test for setline()
tv_get_lnum(typval_T *argvars)
{
linenr_T lnum = -1;
+ int did_emsg_before = did_emsg;
if (argvars[0].v_type != VAR_STRING || !in_vim9script())
lnum = (linenr_T)tv_get_number_chk(&argvars[0], NULL);
- if (lnum <= 0 && argvars[0].v_type != VAR_NUMBER)
+ if (lnum <= 0 && did_emsg_before == did_emsg
+ && argvars[0].v_type != VAR_NUMBER)
{
int fnum;
pos_T *fp;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 715,
/**/
714,
/**/