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

Problem:    Vim9: no check for space before #comment.
Solution:   Add space checks.

2c5ed4e330

Omit ends_excmd2(): the same as ends_excmd() in legacy Vim script.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-05 11:27:28 +08:00
parent 45ca7d4a62
commit 199c7c2898
5 changed files with 25 additions and 10 deletions

View File

@@ -504,9 +504,8 @@ void ex_sort(exarg_T *eap)
eap->nextcmd = check_nextcmd(p);
break;
} else if (!ASCII_ISALPHA(*p) && regmatch.regprog == NULL) {
s = skip_regexp(p + 1, *p, true);
if (*s != *p) {
emsg(_(e_invalpat));
s = skip_regexp_err(p + 1, *p, true);
if (s == NULL) {
goto sortend;
}
*s = NUL;