mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.1482: Vim9: crash when using a nested lambda
Problem: Vim9: crash when using a nested lambda. Solution: Do not clear the growarray when not evaluating. Correct pointer when getting the next line. (closes #6731)
This commit is contained in:
@@ -1624,6 +1624,15 @@ def Test_expr7_lambda_vim9script()
|
||||
assert_equal(12, v)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
# nested lambda with line breaks
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
search('"', 'cW', 0, 0, {->
|
||||
synstack('.', col('.'))
|
||||
->map({_, v -> synIDattr(v, 'name')})->len()})
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_expr7_dict()
|
||||
|
Reference in New Issue
Block a user