summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-01-24 13:03:37 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-24 13:03:37 +0000
commitb149d2279673aa89ab5e35958d05cc4bcc70f82a (patch)
treef659703345e44914d5979341aa7f3180efcb25e7 /src/eval.c
parent5c8771bc5a2be123ab8e6325fa60ed524e8efb09 (diff)
patch 9.0.1239: cannot have a line break before an object member accessv9.0.1239
Problem: Cannot have a line break before an object member access. Solution: Check for "." in next line. (closes #11864)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 2a8b1c52ee..699f43bace 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6747,7 +6747,10 @@ handle_subscript(
// the next line then consume the line break.
p = eval_next_non_blank(*arg, evalarg, &getnext);
if (getnext
- && ((rettv->v_type == VAR_DICT && *p == '.' && eval_isdictc(p[1]))
+ && ((*p == '.'
+ && ((rettv->v_type == VAR_DICT && eval_isdictc(p[1]))
+ || rettv->v_type == VAR_CLASS
+ || rettv->v_type == VAR_OBJECT))
|| (p[0] == '-' && p[1] == '>' && (p[2] == '{'
|| ASCII_ISALPHA(in_vim9script() ? *skipwhite(p + 2)
: p[2])))))