1
0
forked from aniani/vim

patch 8.2.1433: Vim9: cannot mingle comments in multi-line lambda

Problem:    Vim9: cannot mingle comments in multi-line lambda.
Solution:   Skip over NULL lines. (closes #6694)
This commit is contained in:
Bram Moolenaar
2020-08-12 19:15:33 +02:00
parent 6d91bcb4d2
commit ba60cc45e7
3 changed files with 24 additions and 5 deletions

View File

@@ -1729,11 +1729,13 @@ peek_next_line_from_context(cctx_T *cctx)
char_u *line = ((char_u **)cctx->ctx_ufunc->uf_lines.ga_data)[lnum];
char_u *p;
if (line == NULL)
break;
p = skipwhite(line);
if (*p != NUL && !vim9_comment_start(p))
return p;
// ignore NULLs inserted for continuation lines
if (line != NULL)
{
p = skipwhite(line);
if (*p != NUL && !vim9_comment_start(p))
return p;
}
}
return NULL;
}