vim-patch:8.2.1533: Vim9: error when passing getreginfo() result to setreg() #41216

Problem:    Vim9: error when passing getreginfo() result to setreg().
Solution:   Use dict_get_bool() for "isunnamed". (closes vim/vim#6784)

https://github.com/vim/vim/commit/6a950581da52b410a74531044aae8f1f8f38a7df

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund LazoandBram Moolenaar authored and GitHub committed 2026-08-07 16:08:54 -04:00
1 parent d0e8ebbaf3
commit 8773f85473
1 file changed
+1 -1
+1 -1
View File
@@ -6539,7 +6539,7 @@ static void f_setreg(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
pointreg = *stropt;
regname = pointreg;
}
} else if (tv_dict_get_number(d, "isunnamed")) {
} else if (tv_dict_get_bool(d, "isunnamed", -1) > 0) {
pointreg = regname;
}
} else {