0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1037: Vim9: crash when using line continuation inside :def

Problem:    Vim9: crash when using line continuation inside :def.
Solution:   Check for no more lines available.
This commit is contained in:
Bram Moolenaar
2020-06-22 19:39:03 +02:00
parent 373c65104e
commit acd4c5e914
3 changed files with 17 additions and 1 deletions

View File

@@ -2402,8 +2402,11 @@ peek_next_line(cctx_T *cctx)
while (++lnum < cctx->ctx_ufunc->uf_lines.ga_len)
{
char_u *line = ((char_u **)cctx->ctx_ufunc->uf_lines.ga_data)[lnum];
char_u *p = skipwhite(line);
char_u *p;
if (line == NULL)
break;
p = skipwhite(line);
if (*p != NUL && !comment_start(p))
return p;
}