Patch 8.2.3158

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 13, 2021, 2:37:49 PM7/13/21
to vim...@googlegroups.com

Patch 8.2.3158
Problem: Strange error message when using islocked() with a number.
(Yegappan Lakshmanan)
Solution: Check that the name is empty.
Files: src/evalfunc.c, src/testdir/test_functions.vim


*** ../vim-8.2.3157/src/evalfunc.c 2021-07-11 22:04:22.575750556 +0200
--- src/evalfunc.c 2021-07-13 20:27:19.551568993 +0200
***************
*** 5961,5967 ****
if (end != NULL && lv.ll_name != NULL)
{
if (*end != NUL)
! semsg(_(e_trailing_arg), end);
else
{
if (lv.ll_tv == NULL)
--- 5961,5970 ----
if (end != NULL && lv.ll_name != NULL)
{
if (*end != NUL)
! {
! semsg(_(lv.ll_name == lv.ll_name_end
! ? e_invarg2 : e_trailing_arg), end);
! }
else
{
if (lv.ll_tv == NULL)
*** ../vim-8.2.3157/src/testdir/test_functions.vim 2021-07-03 11:58:08.373825923 +0200
--- src/testdir/test_functions.vim 2021-07-13 20:31:28.103259699 +0200
***************
*** 95,100 ****
--- 95,105 ----
call assert_fails('let x = copy([test_void()])', 'E1031:')
endfunc

+ func Test_islocked()
+ call assert_fails('call islocked(99)', 'E475:')
+ call assert_fails('call islocked("s: x")', 'E488:')
+ endfunc
+
func Test_len()
call assert_equal(1, len(0))
call assert_equal(2, len(12))
*** ../vim-8.2.3157/src/version.c 2021-07-13 19:09:02.857482016 +0200
--- src/version.c 2021-07-13 20:26:13.575650218 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3158,
/**/

--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages