mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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:
@@ -3336,9 +3336,9 @@ f_getreg(typval_T *argvars, typval_T *rettv)
|
|||||||
error = strregname == NULL;
|
error = strregname == NULL;
|
||||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
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)
|
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
|
else
|
||||||
|
@@ -1503,6 +1503,12 @@ def Test_expand()
|
|||||||
close
|
close
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_getreg()
|
||||||
|
let lines = ['aaa', 'bbb', 'ccc']
|
||||||
|
setreg('a', lines)
|
||||||
|
assert_equal(lines, getreg('a', true, true))
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_recursive_call()
|
def Test_recursive_call()
|
||||||
assert_equal(6765, Fibonacci(20))
|
assert_equal(6765, Fibonacci(20))
|
||||||
enddef
|
enddef
|
||||||
|
@@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1573,
|
||||||
/**/
|
/**/
|
||||||
1572,
|
1572,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user