]> granicus.if.org Git - vim/commitdiff
patch 9.0.0684: skipped :exe command fails compilation on MS-Windows v9.0.0684
authorBram Moolenaar <Bram@vim.org>
Fri, 7 Oct 2022 14:09:27 +0000 (15:09 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 7 Oct 2022 14:09:27 +0000 (15:09 +0100)
Problem:    Skipped :exe command fails compilation on MS-Windows.
Solution:   Adjust return value when skipping.

src/version.c
src/vim9compile.c
src/vim9instr.c

index 8be8b3820b8695bfb92ad5ad75baa17e2e79a3bd..953bb229215f505f54c9afbddd675e5a9e1ee9c2 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    684,
 /**/
     683,
 /**/
index 38edbab2b8eece80e67cd14b439b4d14021fb9a1..9f36dc951714a9e40cf8aac9acd126ccf67d32c1 100644 (file)
@@ -3339,7 +3339,9 @@ compile_def_function(
            case CMD_echowindow:
                    {
                        long cmd_count = get_cmd_count(line, &ea);
-                       if (cmd_count >= 0)
+                       if (cmd_count < 0)
+                           line = NULL;
+                       else
                            line = compile_mult_expr(p, ea.cmdidx,
                                                             cmd_count, &cctx);
                    }
index 4407d5924efa6a758cb825fc1d0baa05431e909c..9c3b2a9117c84de5e9afb5a05ac6573c015d5896 100644 (file)
@@ -1876,6 +1876,7 @@ generate_MULT_EXPR(cctx_T *cctx, isntype_T isn_type, int count)
 {
     isn_T      *isn;
 
+    RETURN_OK_IF_SKIP(cctx);
     if ((isn = generate_instr_drop(cctx, isn_type, count)) == NULL)
        return FAIL;
     isn->isn_arg.number = count;