mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.2164: Vim9: autoload function doesn't work in uppercased script
Problem: Vim9: autoload function doesn't work in script that starts with an upper case letter. Solution: Check for the autoload character. (closes #7502)
This commit is contained in:
@@ -2799,6 +2799,16 @@ def Test_vim9_autoload()
|
||||
g:some#other = 'other'
|
||||
assert_equal('other', g:some#other)
|
||||
|
||||
# upper case script name works
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Other#getOther(): string
|
||||
return 'other'
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xdir/autoload/Other.vim')
|
||||
assert_equal('other', g:Other#getOther())
|
||||
|
||||
delete('Xdir', 'rf')
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
Reference in New Issue
Block a user