forked from aniani/vim
patch 8.2.1533: Vim9: error when passing getreginfo() result to setreg()
Problem: Vim9: error when passing getreginfo() result to setreg(). Solution: Use dict_get_bool() for "isunnamed". (closes #6784)
This commit is contained in:
@@ -7427,7 +7427,7 @@ f_setreg(typval_T *argvars, typval_T *rettv)
|
|||||||
regname = pointreg;
|
regname = pointreg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dict_get_number(d, (char_u *)"isunnamed"))
|
else if (dict_get_bool(d, (char_u *)"isunnamed", -1) > 0)
|
||||||
pointreg = regname;
|
pointreg = regname;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1419,6 +1419,13 @@ def Test_setbufvar()
|
|||||||
setlocal ts=8
|
setlocal ts=8
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_setreg()
|
||||||
|
setreg('a', ['aaa', 'bbb', 'ccc'])
|
||||||
|
let reginfo = getreginfo('a')
|
||||||
|
setreg('a', reginfo)
|
||||||
|
assert_equal(reginfo, getreginfo('a'))
|
||||||
|
enddef
|
||||||
|
|
||||||
def Fibonacci(n: number): number
|
def Fibonacci(n: number): number
|
||||||
if n < 2
|
if n < 2
|
||||||
return n
|
return n
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
/**/
|
||||||
|
1533,
|
||||||
/**/
|
/**/
|
||||||
1532,
|
1532,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user