Mercurial > vim
comparison src/evalvars.c @ 25232:346002a63bc6 v8.2.3152
patch 8.2.3152: Vim9: accessing "s:" results in an error
Commit: https://github.com/vim/vim/commit/11005b078d2485a306c74f77c9dd158fdd7f3cbe
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 11 20:59:00 2021 +0200
patch 8.2.3152: Vim9: accessing "s:" results in an error
Problem: Vim9: accessing "s:" results in an error.
Solution: Do not try to lookup a script variable for "s:". (closes https://github.com/vim/vim/issues/8549)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 11 Jul 2021 21:00:04 +0200 |
parents | 0a3b1c66d3f2 |
children | 29191571eceb |
comparison
equal
deleted
inserted
replaced
25231:0962ebca2122 | 25232:346002a63bc6 |
---|---|
2658 semsg(_(e_undefined_variable_str), name); | 2658 semsg(_(e_undefined_variable_str), name); |
2659 ret = FAIL; | 2659 ret = FAIL; |
2660 } | 2660 } |
2661 else if (rettv != NULL) | 2661 else if (rettv != NULL) |
2662 { | 2662 { |
2663 if (ht != NULL && ht == get_script_local_ht()) | 2663 if (ht != NULL && ht == get_script_local_ht() |
2664 && tv != &SCRIPT_SV(current_sctx.sc_sid)->sv_var.di_tv) | |
2664 { | 2665 { |
2665 svar_T *sv = find_typval_in_script(tv); | 2666 svar_T *sv = find_typval_in_script(tv); |
2666 | 2667 |
2667 if (sv != NULL) | 2668 if (sv != NULL) |
2668 type = sv->sv_type; | 2669 type = sv->sv_type; |