Mercurial > vim
changeset 22480:5e95de50ddd2 v8.2.1788
patch 8.2.1788: Vim9: still allows :let for declarations
Commit: https://github.com/vim/vim/commit/016faaa1b2fe242022725b29e1353c42105d045c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 3 12:57:27 2020 +0200
patch 8.2.1788: Vim9: still allows :let for declarations
Problem: Vim9: still allows :let for declarations.
Solution: Make the default for v:disallow_let one. It can still be set to
zero to allow for using :let.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 03 Oct 2020 13:00:04 +0200 |
parents | 695881a04101 |
children | 4ca8652b5b4b |
files | src/evalvars.c src/testdir/runtest.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -215,8 +215,8 @@ evalvars_init(void) // add to compat scope dict hash_add(&compat_hashtab, p->vv_di.di_key); } - vimvars[VV_VERSION].vv_nr = VIM_VERSION_100; - vimvars[VV_VERSIONLONG].vv_nr = VIM_VERSION_100 * 10000 + highest_patch(); + set_vim_var_nr(VV_VERSION, VIM_VERSION_100); + set_vim_var_nr(VV_VERSIONLONG, VIM_VERSION_100 * 10000 + highest_patch()); set_vim_var_nr(VV_SEARCHFORWARD, 1L); set_vim_var_nr(VV_HLSEARCH, 1L); @@ -244,6 +244,9 @@ evalvars_init(void) set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); + // TODO: remove later + set_vim_var_nr(VV_DISALLOW_LET, 1); + // Default for v:register is not 0 but '"'. This is adjusted once the // clipboard has been setup by calling reset_reg_var(). set_reg_var(0);
--- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -360,9 +360,6 @@ func FinishTesting() qall! endfunc -" TODO: remove later -let v:disallow_let = 1 - " Source the test script. First grab the file name, in case the script " navigates away. g:testname can be used by the tests. let g:testname = expand('%')