mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3210: Vim9: searchpair() sixth argument is compiled
Problem: Vim9: searchpair() sixth argument is compiled. (Yegappan Lakshmanan) Solution: Only compile the fifth argument.
This commit is contained in:
parent
88421d6dc8
commit
dd0b287c1e
@ -2569,9 +2569,17 @@ def Test_searchpair()
|
|||||||
unlet g:caught
|
unlet g:caught
|
||||||
|
|
||||||
lines =<< trim END
|
lines =<< trim END
|
||||||
echo searchpair("a", "b", "c", "d", "1", "f")
|
echo searchpair("a", "b", "c", "d", "f", 33)
|
||||||
END
|
END
|
||||||
CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:')
|
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!
|
bwipe!
|
||||||
enddef
|
enddef
|
||||||
|
@ -755,6 +755,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 */
|
||||||
|
/**/
|
||||||
|
3210,
|
||||||
/**/
|
/**/
|
||||||
3209,
|
3209,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3315,7 +3315,7 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount, int is_searchpair)
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
++*argcount;
|
++*argcount;
|
||||||
|
|
||||||
if (is_searchpair && *argcount >= 5
|
if (is_searchpair && *argcount == 5
|
||||||
&& cctx->ctx_instr.ga_len == instr_count + 1)
|
&& cctx->ctx_instr.ga_len == instr_count + 1)
|
||||||
{
|
{
|
||||||
isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;
|
isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user