1
0
forked from aniani/vim

patch 9.0.0799: in compiled function ->() on next line not recognized

Problem:    In compiled function ->() on next line not recognized.
Solution:   Also check for "(". (closes #11405)
This commit is contained in:
Bram Moolenaar
2022-10-19 18:04:49 +01:00
parent 3c708c4390
commit d0fbb41eaa
3 changed files with 22 additions and 2 deletions

View File

@@ -1788,12 +1788,13 @@ compile_subscript(
{
char_u *next = peek_next_line_from_context(cctx);
// If a following line starts with "->{" or "->X" advance to that
// line, so that a line break before "->" is allowed.
// If a following line starts with "->{", "->(" or "->X" advance to
// that line, so that a line break before "->" is allowed.
// Also if a following line starts with ".x".
if (next != NULL &&
((next[0] == '-' && next[1] == '>'
&& (next[2] == '{'
|| next[2] == '('
|| ASCII_ISALPHA(*skipwhite(next + 2))))
|| (next[0] == '.' && eval_isdictc(next[1]))))
{