From a44588798564dae1dc28b31af49e38399888d9a2 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 8 Aug 2018 23:16:36 -0400 Subject: vim-patch:8.0.1410: hang when using count() with an empty string Problem: Hang when using count() with an empty string. Solution: Return zero for an empty string. (Dominique Pelle, closes vim/vim#2465) https://github.com/vim/vim/commit/338e47fdfdf0d918dae50a5cbf0cf4f7be45b4f0 --- src/nvim/testdir/test_functions.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir/test_functions.vim') diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 285c4e6327..63794a7a85 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -723,6 +723,7 @@ func Test_count() call assert_equal(0, count("foo", "O")) call assert_equal(2, count("foo", "O", 1)) call assert_equal(2, count("fooooo", "oo")) + call assert_equal(0, count("foo", "")) endfunc func Test_changenr() -- cgit