mirror of
https://github.com/neovim/neovim.git
synced 2026-01-07 03:48:02 +10:00
vim-patch:8.2.1756: Vim9: :let will soon be disallowed (#37063)
Problem: Vim9: :let will soon be disallowed.
Solution: Add v:disallow_let temporarily. Fix tests.
cfcd011fcd
The change to use checkforcmd() is already included in the port of patch
9.0.1505. This commit adds the missing :const check.
N/A patches:
vim-patch:8.2.1397: Vim9: return type of maparg() not adjusted for fourth arg
vim-patch:8.2.1623: Vim9: using :call where it is not needed
vim-patch:8.2.1766: Vim9: Some tests are still using :let
vim-patch:8.2.1788: Vim9: still allows :let for declarations
vim-patch:8.2.1882: Vim9: v:disallow_let is no longer needed
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -116,6 +116,19 @@ func Test_maparg()
|
||||
unlet d
|
||||
endfunc
|
||||
|
||||
" def Test_vim9_maparg()
|
||||
" nmap { w
|
||||
" var one: string = maparg('{')
|
||||
" assert_equal('w', one)
|
||||
" var two: string = maparg('{', 'n')
|
||||
" assert_equal('w', two)
|
||||
" var three: string = maparg('{', 'n', 0)
|
||||
" assert_equal('w', three)
|
||||
" var four: dict<any> = maparg('{', 'n', 0, 1)
|
||||
" assert_equal(['{', 'w', 'n'], [four.lhs, four.rhs, four.mode])
|
||||
" nunmap {
|
||||
" enddef
|
||||
|
||||
func Test_mapcheck()
|
||||
call assert_equal('', mapcheck('a'))
|
||||
call assert_equal('', mapcheck('abc'))
|
||||
|
||||
Reference in New Issue
Block a user