forked from aniani/vim
patch 9.0.1083: empty and comment lines in a class cause an error
Problem: Empty and comment lines in a class cause an error. Solution: Skip empty and comment lines. (closes #11734)
This commit is contained in:
@@ -248,6 +248,16 @@ ex_class(exarg_T *eap)
|
||||
break;
|
||||
char_u *line = skipwhite(theline);
|
||||
|
||||
// Skip empty and comment lines.
|
||||
if (*line == NUL)
|
||||
continue;
|
||||
if (*line == '#')
|
||||
{
|
||||
if (vim9_bad_comment(line))
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
char_u *p = line;
|
||||
if (checkforcmd(&p, "endclass", 4))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user