Mercurial > vim
diff src/testdir/test_search.vim @ 22478:5193420617f1 v8.2.1787
patch 8.2.1787: crash with 'incsearch' and very long line
Commit: https://github.com/vim/vim/commit/795aaa1e84d76a6fe066694de9876b8a21cbe40c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 2 20:36:01 2020 +0200
patch 8.2.1787: crash with 'incsearch' and very long line
Problem: Crash with 'incsearch' and very long line.
Solution: Check whether regprog becomes NULL. (closes https://github.com/vim/vim/issues/7063)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 02 Oct 2020 20:45:03 +0200 |
parents | 0ef3ae4ec70e |
children | 00548e40e708 |
line wrap: on
line diff
--- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -964,6 +964,20 @@ func Test_incsearch_substitute() call Incsearch_cleanup() endfunc +func Test_incsearch_substitute_long_line() + new + call test_override("char_avail", 1) + set incsearch + + call repeat('x', 100000)->setline(1) + call feedkeys(':s/\%c', 'xt') + redraw + call feedkeys("\<Esc>", 'xt') + + call Incsearch_cleanup() + bwipe! +endfunc + " Similar to Test_incsearch_substitute() but with a screendump halfway. func Test_incsearch_substitute_dump() CheckOption incsearch