]> granicus.if.org Git - vim/commitdiff
patch 8.2.1130: Vim9: bar not recognized after function call v8.2.1130
authorBram Moolenaar <Bram@vim.org>
Sun, 5 Jul 2020 13:32:17 +0000 (15:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Jul 2020 13:32:17 +0000 (15:32 +0200)
Problem:    Vim9: bar not recognized after function call
Solution:   Skip whitespace. (closes #6391)

src/testdir/test_vim9_cmd.vim
src/version.c
src/vim9compile.c

index 53d964fa8b4fe589f4edbc4b0c25a3d6dd8400ad..d7c01aae97ca5f261a3ee801951a0de9daf42036 100644 (file)
@@ -216,6 +216,13 @@ def Test_bar_after_command()
   RedrawAndEcho()
   assert_match('did redraw', Screenline(&lines))
 
+  def CallAndEcho()
+    let x = 'did redraw'
+    reg_executing() | echo x
+  enddef
+  CallAndEcho()
+  assert_match('did redraw', Screenline(&lines))
+
   if has('unix')
     # bar in filter write command does not start new command
     def WriteToShell()
index d079d290960203e05bef8b453b2609e708745a1d..c94988faf05c990e7accf7734f283deb76ac5ec3 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1130,
 /**/
     1129,
 /**/
index 5c3d08d30f707660f35843de3795d907f27848ae..b4209a1fee92869e9197b1e434a6ae619d7bd858 100644 (file)
@@ -6985,7 +6985,8 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
 
                // drop the return value
                generate_instr_drop(&cctx, ISN_DROP, 1);
-               line = p;
+
+               line = skipwhite(p);
                continue;
            }
            // CMD_let cannot happen, compile_assignment() above is used