summaryrefslogtreecommitdiffstats
path: root/src/vim9expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r--src/vim9expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 854c09d01c..1fbe05b072 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -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]))))
{