comparison src/vim9execute.c @ 19449:f8408ba21982 v8.2.0282

patch 8.2.0282: Vim9: setting number option not tested Commit: https://github.com/vim/vim/commit/401d9ffb5a8a40102c000c2d2614aa043f541f90 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 19 18:14:44 2020 +0100 patch 8.2.0282: Vim9: setting number option not tested Problem: Vim9: setting number option not tested. Solution: Add more tests. Fix assigning to global variable.
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Feb 2020 18:15:05 +0100
parents 6e27e1ffa2a6
children 655631882288
comparison
equal deleted inserted replaced
19448:d39989f46ad3 19449:f8408ba21982
724 case ISN_STOREREG: 724 case ISN_STOREREG:
725 { 725 {
726 int reg = iptr->isn_arg.number; 726 int reg = iptr->isn_arg.number;
727 727
728 --ectx.ec_stack.ga_len; 728 --ectx.ec_stack.ga_len;
729 tv = STACK_TV_BOT(0);
729 write_reg_contents(reg == '@' ? '"' : reg, 730 write_reg_contents(reg == '@' ? '"' : reg,
730 tv_get_string(STACK_TV_BOT(0)), -1, FALSE); 731 tv_get_string(tv), -1, FALSE);
732 clear_tv(tv);
731 } 733 }
732 break; 734 break;
733 735
734 // store v: variable 736 // store v: variable
735 case ISN_STOREV: 737 case ISN_STOREV:
744 { 746 {
745 dictitem_T *di; 747 dictitem_T *di;
746 748
747 --ectx.ec_stack.ga_len; 749 --ectx.ec_stack.ga_len;
748 di = find_var_in_ht(get_globvar_ht(), 0, 750 di = find_var_in_ht(get_globvar_ht(), 0,
749 iptr->isn_arg.string, TRUE); 751 iptr->isn_arg.string + 2, TRUE);
750 if (di == NULL) 752 if (di == NULL)
751 { 753 {
752 funccal_entry_T entry; 754 funccal_entry_T entry;
753 755
754 save_funccal(&entry); 756 save_funccal(&entry);