comparison src/userfunc.c @ 28313:b418e073b42f v8.2.4682

patch 8.2.4682: Vim9: can use :unlockvar for const variable Commit: https://github.com/vim/vim/commit/7a411a306f90339d8686e42ac16e1ae4fc7533c5 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 4 14:58:06 2022 +0100 patch 8.2.4682: Vim9: can use :unlockvar for const variable Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael) Solution: Check whether the variable is a const.
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Apr 2022 16:00:03 +0200
parents 39a833e69bf3
children f24d4826e6bf
comparison
equal deleted inserted replaced
28312:fb6d65010f23 28313:b418e073b42f
1695 1695
1696 if (s != NULL) 1696 if (s != NULL)
1697 { 1697 {
1698 if (!did_type && type != NULL && ht == get_script_local_ht()) 1698 if (!did_type && type != NULL && ht == get_script_local_ht())
1699 { 1699 {
1700 svar_T *sv = find_typval_in_script(tv, 0); 1700 svar_T *sv = find_typval_in_script(tv, 0, TRUE);
1701 1701
1702 if (sv != NULL) 1702 if (sv != NULL)
1703 *type = sv->sv_type; 1703 *type = sv->sv_type;
1704 } 1704 }
1705 return s; 1705 return s;