diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_hlsearch.vim | 18 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_hlsearch.vim b/src/testdir/test_hlsearch.vim index 066fdd025..b934d38e1 100644 --- a/src/testdir/test_hlsearch.vim +++ b/src/testdir/test_hlsearch.vim @@ -32,3 +32,21 @@ function! Test_hlsearch() call getchar(1) enew! endfunction + +func Test_hlsearch_hangs() + if !has('reltime') || !has('float') + return + endif + + " This pattern takes forever to match, it should timeout. + help + let start = reltime() + set hlsearch nolazyredraw redrawtime=101 + let @/ = '\%#=2\v(a|\1)*' + redraw + let elapsed = reltimefloat(reltime(start)) + call assert_true(elapsed > 0.1) + call assert_true(elapsed < 1.0) + set nohlsearch redrawtime& + quit +endfunc diff --git a/src/version.c b/src/version.c index 268d4d7d2..24bb8206b 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 644, +/**/ 643, /**/ 642, |