Patch 7.4.2329
Problem: Error for min() and max() contains %s. (Nikolay Pavlov)
Solution: Pass the function name. (closes #1040)
Files: src/evalfunc.c, src/testdir/test_expr.vim
*** ../vim-7.4.2328/src/evalfunc.c 2016-09-01 15:11:13.540265471 +0200
--- src/evalfunc.c 2016-09-04 21:38:53.059927760 +0200
***************
*** 7629,7635 ****
}
}
else
! EMSG(_(e_listdictarg));
rettv->vval.v_number = error ? 0 : n;
}
--- 7629,7635 ----
}
}
else
! EMSG2(_(e_listdictarg), domax ? "max()" : "min()");
rettv->vval.v_number = error ? 0 : n;
}
*** ../vim-7.4.2328/src/testdir/test_expr.vim 2016-08-29 21:55:16.348528588
+0200
--- src/testdir/test_expr.vim 2016-09-04 21:41:26.354619428 +0200
***************
*** 335,340 ****
--- 335,347 ----
call assert_fails('echo printf("%d", 1.2)', 'E805:')
endfunc
+ function Test_max_min_errors()
+ call assert_fails('call max(v:true)', 'E712:')
+ call assert_fails('call max(v:true)', 'max()')
+ call assert_fails('call min(v:true)', 'E712:')
+ call assert_fails('call min(v:true)', 'min()')
+ endfunc
+
function Test_printf_64bit()
if has('num64')
call assert_equal("123456789012345", printf('%d', 123456789012345))
*** ../vim-7.4.2328/src/version.c 2016-09-04 21:33:05.310834411 +0200
--- src/version.c 2016-09-04 21:41:56.474362514 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2329,
/**/
--
Keep America beautiful. Swallow your beer cans.
/// 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].
For more options, visit https://groups.google.com/d/optout.