mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.2079: Vim9: cannot put a linebreak before or after "in" of ":for"
Problem: Vim9: cannot put a linebreak before or after "in" of ":for". Solution: Skip over linebreak.
This commit is contained in:
@@ -1849,6 +1849,28 @@ def Test_for_loop()
|
||||
concat ..= str
|
||||
endfor
|
||||
assert_equal('onetwo', concat)
|
||||
|
||||
var total = 0
|
||||
for nr in
|
||||
[1, 2, 3]
|
||||
total += nr
|
||||
endfor
|
||||
assert_equal(6, total)
|
||||
|
||||
total = 0
|
||||
for nr
|
||||
in [1, 2, 3]
|
||||
total += nr
|
||||
endfor
|
||||
assert_equal(6, total)
|
||||
|
||||
total = 0
|
||||
for nr
|
||||
in
|
||||
[1, 2, 3]
|
||||
total += nr
|
||||
endfor
|
||||
assert_equal(6, total)
|
||||
enddef
|
||||
|
||||
def Test_for_loop_fails()
|
||||
|
Reference in New Issue
Block a user