Mercurial > vim
diff src/vim9compile.c @ 23114:462774c327df v8.2.2103
patch 8.2.2103: Vim9: unreachable code
Commit: https://github.com/vim/vim/commit/41d6196e302af5f1a99aeeac587b5c662c410166
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 6 20:12:43 2020 +0100
patch 8.2.2103: Vim9: unreachable code
Problem: Vim9: unreachable code.
Solution: Remove the code to prepend s: to the variable name
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Dec 2020 20:15:04 +0100 |
parents | 545ff3b4543c |
children | 60a0221beab0 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -5179,19 +5179,9 @@ generate_store_var( if (scriptvar_idx < 0) { char_u *name_s = name; - int r; - - // Include s: in the name for store_var() - if (name[1] != ':') - { - int len = (int)STRLEN(name) + 3; - - name_s = alloc(len); - if (name_s == NULL) - name_s = name; - else - vim_snprintf((char *)name_s, len, "s:%s", name); - } + int r; + + // "s:" is included in the name. r = generate_OLDSCRIPT(cctx, ISN_STORES, name_s, scriptvar_sid, type); if (name_s != name)