diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-19 18:14:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-19 18:14:44 +0100 |
commit | 401d9ffb5a8a40102c000c2d2614aa043f541f90 (patch) | |
tree | 0f85933f885880c25d30d6f59284aaf105ea06ea /src/vim9execute.c | |
parent | a2f6e42ded067df8ee682c15aa246491a389b1a0 (diff) | |
download | vim-git-401d9ffb5a8a40102c000c2d2614aa043f541f90.tar.gz |
patch 8.2.0282: Vim9: setting number option not testedv8.2.0282
Problem: Vim9: setting number option not tested.
Solution: Add more tests. Fix assigning to global variable.
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index 4349489e5..399720aaf 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -726,8 +726,10 @@ call_def_function( int reg = iptr->isn_arg.number; --ectx.ec_stack.ga_len; + tv = STACK_TV_BOT(0); write_reg_contents(reg == '@' ? '"' : reg, - tv_get_string(STACK_TV_BOT(0)), -1, FALSE); + tv_get_string(tv), -1, FALSE); + clear_tv(tv); } break; @@ -746,7 +748,7 @@ call_def_function( --ectx.ec_stack.ga_len; di = find_var_in_ht(get_globvar_ht(), 0, - iptr->isn_arg.string, TRUE); + iptr->isn_arg.string + 2, TRUE); if (di == NULL) { funccal_entry_T entry; |