mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2453: Vim9: a variable name with "->" in the next line doesn't work
Problem: Vim9: a variable name with "->" in the next line doesn't work. Solution: Recognize a variable name by itself. (closes #7770)
This commit is contained in:
@@ -328,6 +328,29 @@ def Test_method_call_linebreak()
|
||||
assert_equal([1, 2, 3], res)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
new
|
||||
var name = [1, 2]
|
||||
name
|
||||
->copy()
|
||||
->setline(1)
|
||||
assert_equal(['1', '2'], getline(1, 2))
|
||||
bwipe!
|
||||
END
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
new
|
||||
g:shortlist
|
||||
->copy()
|
||||
->setline(1)
|
||||
assert_equal(['1', '2'], getline(1, 2))
|
||||
bwipe!
|
||||
END
|
||||
g:shortlist = [1, 2]
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
unlet g:shortlist
|
||||
enddef
|
||||
|
||||
def Test_method_call_whitespace()
|
||||
|
Reference in New Issue
Block a user