mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1515: Vim9: can create s:var in legacy script but cannot unlet
Problem: Vim9: can create s:var in legacy script but cannot unlet. Solution: Allow :unlet for legacy script var.
This commit is contained in:
@@ -608,6 +608,13 @@ def Test_unlet()
|
||||
assert_false(exists('g:somevar'))
|
||||
unlet! g:somevar
|
||||
|
||||
# also works for script-local variable in legacy Vim script
|
||||
s:somevar = 'legacy'
|
||||
assert_true(exists('s:somevar'))
|
||||
unlet s:somevar
|
||||
assert_false(exists('s:somevar'))
|
||||
unlet! s:somevar
|
||||
|
||||
call CheckScriptFailure([
|
||||
'vim9script',
|
||||
'let svar = 123',
|
||||
|
Reference in New Issue
Block a user