To: vim_dev@googlegroups.com Subject: Patch 8.2.3210 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3210 Problem: Vim9: searchpair() sixth argument is compiled. (Yegappan Lakshmanan) Solution: Only compile the fifth argument. Files: src/vim9compile.c, src/testdir/test_vim9_builtin.vim *** ../vim-8.2.3209/src/vim9compile.c 2021-07-24 14:14:42.178904987 +0200 --- src/vim9compile.c 2021-07-24 15:32:12.959566719 +0200 *************** *** 3315,3321 **** return FAIL; ++*argcount; ! if (is_searchpair && *argcount >= 5 && cctx->ctx_instr.ga_len == instr_count + 1) { isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count; --- 3315,3321 ---- return FAIL; ++*argcount; ! if (is_searchpair && *argcount == 5 && cctx->ctx_instr.ga_len == instr_count + 1) { isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count; *** ../vim-8.2.3209/src/testdir/test_vim9_builtin.vim 2021-07-24 13:18:43.861887612 +0200 --- src/testdir/test_vim9_builtin.vim 2021-07-24 15:43:58.041853983 +0200 *************** *** 2569,2577 **** unlet g:caught lines =<< trim END ! echo searchpair("a", "b", "c", "d", "1", "f") END ! CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:') bwipe! enddef --- 2569,2585 ---- unlet g:caught lines =<< trim END ! echo searchpair("a", "b", "c", "d", "f", 33) END ! CheckDefAndScriptFailure2(lines, 'E1001: Variable not found: f', 'E475: Invalid argument: d') ! ! lines =<< trim END ! def TestPair() ! echo searchpair("a", "b", "c", "d", "1", "f") ! enddef ! defcompile ! END ! CheckScriptSuccess(lines) bwipe! enddef *** ../vim-8.2.3209/src/version.c 2021-07-24 14:14:42.178904987 +0200 --- src/version.c 2021-07-24 15:41:21.902232427 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3210, /**/ -- hundred-and-one symptoms of being an internet addict: 224. You set up your own Web page. You set up a Web page for each of your kids... and your pets. /// Bram Moolenaar -- Bram@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 ///