1
0
forked from aniani/vim

patch 8.2.0612: Vim9: no check for space before #comment

Problem:    Vim9: no check for space before #comment.
Solution:   Add space checks.
This commit is contained in:
Bram Moolenaar
2020-04-20 19:42:10 +02:00
parent faac410409
commit 2c5ed4e330
9 changed files with 96 additions and 19 deletions

View File

@@ -534,17 +534,37 @@ skip_anyof(char_u *p)
/*
* Skip past regular expression.
* Stop at end of "startp" or where "dirc" is found ('/', '?', etc).
* Stop at end of "startp" or where "delim" is found ('/', '?', etc).
* Take care of characters with a backslash in front of it.
* Skip strings inside [ and ].
*/
char_u *
skip_regexp(
char_u *startp,
int dirc,
int delim,
int magic)
{
return skip_regexp_ex(startp, dirc, magic, NULL, NULL);
return skip_regexp_ex(startp, delim, magic, NULL, NULL);
}
/*
* Call skip_regexp() and when the delimiter does not match give an error and
* return NULL.
*/
char_u *
skip_regexp_err(
char_u *startp,
int delim,
int magic)
{
char_u *p = skip_regexp(startp, delim, magic);
if (*p != delim)
{
semsg(_("E654: missing delimiter after search pattern: %s"), startp);
return NULL;
}
return p;
}
/*