]> granicus.if.org Git - vim/commitdiff
patch 8.2.1788: Vim9: still allows :let for declarations v8.2.1788
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Oct 2020 10:57:27 +0000 (12:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Oct 2020 10:57:27 +0000 (12:57 +0200)
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.

src/evalvars.c
src/testdir/runtest.vim
src/version.c

index 319717ec898b1afec514b78134b970b76bfd9cf4..fdc6f454a54cedea0f7a5596f366828bd1309236 100644 (file)
@@ -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);
index 08b1f8ec88636cd3a48a3e25be75437a59ad5b6b..6b09b975dec6ba7d491681ea6c37f496a682d6a4 100644 (file)
@@ -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('%')
index 877d63de408fb80d5a620e0ba1ab221d975318d3..ff1a97a3d88d3a976d75b5288c2a2f664ec49350 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1788,
 /**/
     1787,
 /**/