0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.1029: Vim9: cannot chain function calls with -> at line start

Problem:    Vim9: cannot chain function calls with -> at line start.
Solution:   Peek ahead for a following line starting with "->". (closes #6306)
This commit is contained in:
Bram Moolenaar
2020-06-21 16:58:13 +02:00
parent e55b1c098d
commit 23c5527373
3 changed files with 89 additions and 56 deletions

View File

@@ -1036,6 +1036,24 @@ def Test_expr7_subscript_linebreak()
map('string(v:key)')
assert_equal(['0', '1', '2'], l)
l = range
->map('string(v:key)')
assert_equal(['0', '1', '2'], l)
l = range # comment
->map('string(v:key)')
assert_equal(['0', '1', '2'], l)
l = range
->map('string(v:key)')
assert_equal(['0', '1', '2'], l)
l = range
# comment
->map('string(v:key)')
assert_equal(['0', '1', '2'], l)
assert_equal('1', l[
1])