Mercurial > vim
comparison src/userfunc.c @ 21737:a849c984b485 v8.2.1418
patch 8.2.1418: Vim9: invalid error for missing white space
Commit: https://github.com/vim/vim/commit/8294d49937b99067522fda8a9399bb9533e3c44e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 10 22:40:56 2020 +0200
patch 8.2.1418: Vim9: invalid error for missing white space
Problem: Vim9: invalid error for missing white space after function.
Solution: Do not skip over white space. (closes https://github.com/vim/vim/issues/6679)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 10 Aug 2020 22:45:04 +0200 |
parents | 1b96535705a0 |
children | 7e1316c6d0eb |
comparison
equal
deleted
inserted
replaced
21736:38ea8c418214 | 21737:a849c984b485 |
---|---|
684 } | 684 } |
685 | 685 |
686 while (--argcount >= 0) | 686 while (--argcount >= 0) |
687 clear_tv(&argvars[argcount]); | 687 clear_tv(&argvars[argcount]); |
688 | 688 |
689 *arg = skipwhite(argp); | 689 if (in_vim9script()) |
690 *arg = argp; | |
691 else | |
692 *arg = skipwhite(argp); | |
690 return ret; | 693 return ret; |
691 } | 694 } |
692 | 695 |
693 /* | 696 /* |
694 * Return TRUE if "p" starts with "<SID>" or "s:". | 697 * Return TRUE if "p" starts with "<SID>" or "s:". |
4095 | 4098 |
4096 // When inside :try we need to check for following "| catch". | 4099 // When inside :try we need to check for following "| catch". |
4097 if (!failed || eap->cstack->cs_trylevel > 0) | 4100 if (!failed || eap->cstack->cs_trylevel > 0) |
4098 { | 4101 { |
4099 // Check for trailing illegal characters and a following command. | 4102 // Check for trailing illegal characters and a following command. |
4103 arg = skipwhite(arg); | |
4100 if (!ends_excmd2(eap->arg, arg)) | 4104 if (!ends_excmd2(eap->arg, arg)) |
4101 { | 4105 { |
4102 if (!failed) | 4106 if (!failed) |
4103 { | 4107 { |
4104 emsg_severe = TRUE; | 4108 emsg_severe = TRUE; |