mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1573: Vim9: getreg() does not take "true" as argument
Problem: Vim9: getreg() does not take "true" as argument. Solution: Use tv_get_bool_chk(). (closes #6820)
This commit is contained in:
parent
551d25e765
commit
67ff97ded7
@ -3336,9 +3336,9 @@ f_getreg(typval_T *argvars, typval_T *rettv)
|
||||
error = strregname == NULL;
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
arg2 = (int)tv_get_number_chk(&argvars[1], &error);
|
||||
arg2 = (int)tv_get_bool_chk(&argvars[1], &error);
|
||||
if (!error && argvars[2].v_type != VAR_UNKNOWN)
|
||||
return_list = (int)tv_get_number_chk(&argvars[2], &error);
|
||||
return_list = (int)tv_get_bool_chk(&argvars[2], &error);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1503,6 +1503,12 @@ def Test_expand()
|
||||
close
|
||||
enddef
|
||||
|
||||
def Test_getreg()
|
||||
let lines = ['aaa', 'bbb', 'ccc']
|
||||
setreg('a', lines)
|
||||
assert_equal(lines, getreg('a', true, true))
|
||||
enddef
|
||||
|
||||
def Test_recursive_call()
|
||||
assert_equal(6765, Fibonacci(20))
|
||||
enddef
|
||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1573,
|
||||
/**/
|
||||
1572,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user