mirror of
https://github.com/vim/vim.git
synced 2025-11-09 10:37:17 -05:00
patch 9.1.1588: Vim9: cannot split dict inside command block
Problem: Vim9: cannot split dict inside command block
(lacygoill)
Solution: Remove the current restriction (Yegappan Lakshmanan).
fixes: #17841
closes: #17845
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
0bda7830ac
commit
a566a78029
@@ -5457,6 +5457,22 @@ def Test_if_cond_shortcircuit_skip_indexing()
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for defining a dict with multiple keys in a command-block
|
||||
def Test_multikey_dict_in_block()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
command NewCommand {
|
||||
g:TestDict = {
|
||||
'key': 'v1',
|
||||
'other_key': 'v2' }
|
||||
}
|
||||
NewCommand
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
assert_equal({key: 'v1', other_key: 'v2'}, g:TestDict)
|
||||
unlet g:TestDict
|
||||
enddef
|
||||
|
||||
" Keep this last, it messes up highlighting.
|
||||
def Test_substitute_cmd()
|
||||
new
|
||||
|
||||
Reference in New Issue
Block a user