mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2575: Vim9: a function name with "->" in the next line doesn't work
Problem: Vim9: a function name with "->" in the next line doesn't work. Solution: Recognize a function name by itself. (closes #7770)
This commit is contained in:
@@ -355,6 +355,25 @@ def Test_method_call_linebreak()
|
||||
END
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
new
|
||||
def Foo(): string
|
||||
return 'the text'
|
||||
enddef
|
||||
def Bar(F: func): string
|
||||
return F()
|
||||
enddef
|
||||
def Test()
|
||||
Foo
|
||||
->Bar()
|
||||
->setline(1)
|
||||
enddef
|
||||
Test()
|
||||
assert_equal('the text', getline(1))
|
||||
bwipe!
|
||||
END
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
new
|
||||
g:shortlist
|
||||
|
Reference in New Issue
Block a user