Patch 8.2.3346
Problem:    Vim9: no error for using "." for concatenation after ":vim9cmd".
            (Naohiro Ono)
Solution:   Check for Vim9 script syntax. (closes #8756)
Files:      src/eval.c, src/testdir/test_vim9_cmd.vim


*** ../vim-8.2.3345/src/eval.c  2021-08-13 20:12:08.344119978 +0200
--- src/eval.c  2021-08-14 21:29:54.594147088 +0200
***************
*** 2860,2866 ****
        // "++" and "--" on the next line are a separate command.
        p = eval_next_non_blank(*arg, evalarg, &getnext);
        op = *p;
!       concat = op == '.' && (*(p + 1) == '.' || current_sctx.sc_version < 2);
        if ((op != '+' && op != '-' && !concat) || p[1] == '='
                                               || (p[1] == '.' && p[2] == '='))
            break;
--- 2860,2867 ----
        // "++" and "--" on the next line are a separate command.
        p = eval_next_non_blank(*arg, evalarg, &getnext);
        op = *p;
!       concat = op == '.' && (*(p + 1) == '.'
!                             || (current_sctx.sc_version < 2 && !vim9script));
        if ((op != '+' && op != '-' && !concat) || p[1] == '='
                                               || (p[1] == '.' && p[2] == '='))
            break;
*** ../vim-8.2.3345/src/testdir/test_vim9_cmd.vim       2021-08-13 
19:40:47.417028286 +0200
--- src/testdir/test_vim9_cmd.vim       2021-08-14 21:31:06.814247908 +0200
***************
*** 14,19 ****
--- 14,20 ----
    END
    CheckScriptSuccess(lines)
    assert_fails('vim9cmd', 'E1164:')
+   assert_fails('vim9cmd echo "con" . "cat"', 'E15:')
  
    lines =<< trim END
        vim9script
*** ../vim-8.2.3345/src/version.c       2021-08-14 21:11:47.500966948 +0200
--- src/version.c       2021-08-14 21:32:40.962324631 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3346,
  /**/

-- 
An indication you must be a manager:
You give constructive feedback to your dog.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202108141936.17EJaCCS3825276%40masaka.moolenaar.net.

Raspunde prin e-mail lui