forked from aniani/vim
patch 8.2.1178: Vim9: filter function recognized as command modifier
Problem: Vim9: filter function recognized as command modifier, leading to a
crash.
Solution: Clear cmdmod after freeing items. Do not recognize a command
modifier followed by non-white space. (closes #6434)
This commit is contained in:
@@ -265,6 +265,12 @@ def Test_bar_after_command()
|
||||
endif
|
||||
enddef
|
||||
|
||||
def Test_filter_is_not_modifier()
|
||||
let tags = [{'a': 1, 'b': 2}, {'x': 3, 'y': 4}]
|
||||
filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 })
|
||||
assert_equal([#{x: 3, y: 4}], tags)
|
||||
enddef
|
||||
|
||||
def Test_eval_command()
|
||||
let from = 3
|
||||
let to = 5
|
||||
|
||||
Reference in New Issue
Block a user