From a6b14dbb0be0145c2c347de65738042f27325519 Mon Sep 17 00:00:00 2001 From: lonerover Date: Tue, 27 Dec 2016 11:15:44 +0800 Subject: vim-patch:7.4.1816 (#5833) Problem: Looping over a null list throws an error. Solution: Skip over the for loop. https://github.com/vim/vim/commit/d8585eded6359f1d7e1981e96ae775efd077c638 --- src/nvim/testdir/test_expr.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index cc5e9587ed..571a37c62c 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -74,3 +74,10 @@ func Test_dict() call assert_equal('none', d['']) call assert_equal('aaa', d['a']) endfunc + +func Test_loop_over_null_list() + let null_list = submatch(1, 1) + for i in null_list + call assert_true(0, 'should not get here') + endfor +endfunc -- cgit