To: vim_dev@googlegroups.com Subject: Patch 8.2.1418 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1418 Problem: Vim9: invalid error for missing white space after function. Solution: Do not skip over white space. (closes #6679) Files: src/userfunc.c, src/testdir/test_vim9_expr.vim *** ../vim-8.2.1417/src/userfunc.c 2020-08-08 22:15:56.712722262 +0200 --- src/userfunc.c 2020-08-10 22:39:29.218920130 +0200 *************** *** 686,692 **** while (--argcount >= 0) clear_tv(&argvars[argcount]); ! *arg = skipwhite(argp); return ret; } --- 686,695 ---- while (--argcount >= 0) clear_tv(&argvars[argcount]); ! if (in_vim9script()) ! *arg = argp; ! else ! *arg = skipwhite(argp); return ret; } *************** *** 4097,4102 **** --- 4100,4106 ---- if (!failed || eap->cstack->cs_trylevel > 0) { // Check for trailing illegal characters and a following command. + arg = skipwhite(arg); if (!ends_excmd2(eap->arg, arg)) { if (!failed) *** ../vim-8.2.1417/src/testdir/test_vim9_expr.vim 2020-08-10 21:57:49.035237496 +0200 --- src/testdir/test_vim9_expr.vim 2020-08-10 22:31:28.760439892 +0200 *************** *** 706,712 **** let x = 1 enddef ! def Test_expr4_vimscript() # check line continuation let lines =<< trim END vim9script --- 706,712 ---- let x = 1 enddef ! def Test_expr4_vim9script() # check line continuation let lines =<< trim END vim9script *************** *** 819,824 **** --- 819,830 ---- echo 2!= 3 END CheckScriptFailure(lines, 'E1004:') + + lines =<< trim END + vim9script + echo len('xxx') == 3 + END + CheckScriptSuccess(lines) enddef func Test_expr4_fails() *** ../vim-8.2.1417/src/version.c 2020-08-10 22:15:25.559054214 +0200 --- src/version.c 2020-08-10 22:28:23.268993229 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1418, /**/ -- hundred-and-one symptoms of being an internet addict: 170. You introduce your wife as "my_lady@home.wife" and refer to your children as "forked processes." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///