Mercurial > vim
diff src/eval.c @ 31813:cd4065ab4503 v9.0.1239
patch 9.0.1239: cannot have a line break before an object member access
Commit: https://github.com/vim/vim/commit/b149d2279673aa89ab5e35958d05cc4bcc70f82a
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 24 13:03:37 2023 +0000
patch 9.0.1239: cannot have a line break before an object member access
Problem: Cannot have a line break before an object member access.
Solution: Check for "." in next line. (closes https://github.com/vim/vim/issues/11864)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 24 Jan 2023 14:15:03 +0100 |
parents | 57248cc8bd70 |
children | 7d505d77f6da |
line wrap: on
line diff
--- 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])))))