Patch 8.2.3152
Problem: Vim9: accessing "s:" results in an error.
Solution: Do not try to lookup a script variable for "s:". (closes #8549)
Files: src/evalvars.c, src/testdir/test_vim9_expr.vim
*** ../vim-8.2.3151/src/evalvars.c 2021-07-08 21:38:45.339232318 +0200
--- src/evalvars.c 2021-07-11 20:57:07.220350812 +0200
***************
*** 2660,2666 ****
}
else if (rettv != NULL)
{
! if (ht != NULL && ht == get_script_local_ht())
{
svar_T *sv = find_typval_in_script(tv);
--- 2660,2667 ----
}
else if (rettv != NULL)
{
! if (ht != NULL && ht == get_script_local_ht()
! && tv != &SCRIPT_SV(current_sctx.sc_sid)->sv_var.di_tv)
{
svar_T *sv = find_typval_in_script(tv);
*** ../vim-8.2.3151/src/testdir/test_vim9_expr.vim 2021-07-10
19:41:59.916341599 +0200
--- src/testdir/test_vim9_expr.vim 2021-07-11 20:55:31.288535964 +0200
***************
*** 2478,2483 ****
--- 2478,2490 ----
else
CheckDefAndScriptFailure(lines, 'E117:', 0)
endif
+
+ lines =<< trim END
+ vim9script
+ var x = 99
+ assert_equal({x: 99}, s:)
+ END
+ CheckScriptSuccess(lines)
enddef
def Test_expr7_call_2bool()
*** ../vim-8.2.3151/src/version.c 2021-07-11 20:22:26.260154906 +0200
--- src/version.c 2021-07-11 20:52:48.996782150 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3152,
/**/
--
hundred-and-one symptoms of being an internet addict:
121. You ask for e-mail adresses instead of telephone numbers.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202107111859.16BIxbZG894670%40masaka.moolenaar.net.