Mercurial > vim
diff src/vim9compile.c @ 27613:42d0279c6e7c v8.2.4333
patch 8.2.4333: cstack not always passed to where it is needed
Commit: https://github.com/vim/vim/commit/b6a138eb334621f60c5891d035f80f398d59dbd3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 8 21:17:22 2022 +0000
patch 8.2.4333: cstack not always passed to where it is needed
Problem: cstack not always passed to where it is needed.
Solution: Pass ctack through functions.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Feb 2022 22:30:03 +0100 |
parents | e311a80f8cbe |
children | 5c4ab8d4472c |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -532,7 +532,12 @@ check_item_writable(svar_T *sv, int chec * If not found or the variable is not writable returns -2. */ int -get_script_item_idx(int sid, char_u *name, int check_writable, cctx_T *cctx) +get_script_item_idx( + int sid, + char_u *name, + int check_writable, + cctx_T *cctx, + cstack_T *cstack) { hashtab_T *ht; dictitem_T *di; @@ -544,7 +549,7 @@ get_script_item_idx(int sid, char_u *nam return -1; if (sid == current_sctx.sc_sid) { - sallvar_T *sav = find_script_var(name, 0, cctx, NULL); + sallvar_T *sav = find_script_var(name, 0, cctx, cstack); if (sav == NULL) return -2; @@ -1449,7 +1454,7 @@ compile_lhs( lhs->lhs_scriptvar_idx = get_script_item_idx( lhs->lhs_scriptvar_sid, rawname, lhs->lhs_has_index ? ASSIGN_FINAL : ASSIGN_CONST, - cctx); + cctx, NULL); if (lhs->lhs_scriptvar_idx >= 0) { scriptitem_T *si = SCRIPT_ITEM(