Mercurial > vim
comparison src/vim9expr.c @ 30930:cbfbf0e17cd0 v9.0.0799
patch 9.0.0799: in compiled function ->() on next line not recognized
Commit: https://github.com/vim/vim/commit/d0fbb41eaa737dd64877c8cebaff19854e2d504f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 19 18:04:49 2022 +0100
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 https://github.com/vim/vim/issues/11405)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 19 Oct 2022 19:15:03 +0200 |
parents | 54ba95d2d2eb |
children | 360f286b5869 |
comparison
equal
deleted
inserted
replaced
30929:88b181cb4a74 | 30930:cbfbf0e17cd0 |
---|---|
1786 | 1786 |
1787 if (*p == NUL || (VIM_ISWHITE(**arg) && vim9_comment_start(p))) | 1787 if (*p == NUL || (VIM_ISWHITE(**arg) && vim9_comment_start(p))) |
1788 { | 1788 { |
1789 char_u *next = peek_next_line_from_context(cctx); | 1789 char_u *next = peek_next_line_from_context(cctx); |
1790 | 1790 |
1791 // If a following line starts with "->{" or "->X" advance to that | 1791 // If a following line starts with "->{", "->(" or "->X" advance to |
1792 // line, so that a line break before "->" is allowed. | 1792 // that line, so that a line break before "->" is allowed. |
1793 // Also if a following line starts with ".x". | 1793 // Also if a following line starts with ".x". |
1794 if (next != NULL && | 1794 if (next != NULL && |
1795 ((next[0] == '-' && next[1] == '>' | 1795 ((next[0] == '-' && next[1] == '>' |
1796 && (next[2] == '{' | 1796 && (next[2] == '{' |
1797 || next[2] == '(' | |
1797 || ASCII_ISALPHA(*skipwhite(next + 2)))) | 1798 || ASCII_ISALPHA(*skipwhite(next + 2)))) |
1798 || (next[0] == '.' && eval_isdictc(next[1])))) | 1799 || (next[0] == '.' && eval_isdictc(next[1])))) |
1799 { | 1800 { |
1800 next = next_line_from_context(cctx, TRUE); | 1801 next = next_line_from_context(cctx, TRUE); |
1801 if (next == NULL) | 1802 if (next == NULL) |