mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2525: Vim9: only local variables checked for a name
Problem: Vim9: only local variables checked for a name. Solution: Also check arguments and script variables. (closes #7838)
This commit is contained in:
@@ -323,6 +323,11 @@ def Test_for_linebreak()
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def MethodAfterLinebreak(arg: string)
|
||||
arg
|
||||
->setline(1)
|
||||
enddef
|
||||
|
||||
def Test_method_call_linebreak()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
@@ -361,6 +366,11 @@ def Test_method_call_linebreak()
|
||||
g:shortlist = [1, 2]
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
unlet g:shortlist
|
||||
|
||||
new
|
||||
MethodAfterLinebreak('foobar')
|
||||
assert_equal('foobar', getline(1))
|
||||
bwipe!
|
||||
enddef
|
||||
|
||||
def Test_method_call_whitespace()
|
||||
|
Reference in New Issue
Block a user