Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
22477:eb2150150b99 | 22478:5193420617f1 |
---|---|
960 call assert_equal('xxx 5', getline(5)) | 960 call assert_equal('xxx 5', getline(5)) |
961 call assert_equal('xxx 6', getline(6)) | 961 call assert_equal('xxx 6', getline(6)) |
962 call assert_equal('foo 7', getline(7)) | 962 call assert_equal('foo 7', getline(7)) |
963 | 963 |
964 call Incsearch_cleanup() | 964 call Incsearch_cleanup() |
965 endfunc | |
966 | |
967 func Test_incsearch_substitute_long_line() | |
968 new | |
969 call test_override("char_avail", 1) | |
970 set incsearch | |
971 | |
972 call repeat('x', 100000)->setline(1) | |
973 call feedkeys(':s/\%c', 'xt') | |
974 redraw | |
975 call feedkeys("\<Esc>", 'xt') | |
976 | |
977 call Incsearch_cleanup() | |
978 bwipe! | |
965 endfunc | 979 endfunc |
966 | 980 |
967 " Similar to Test_incsearch_substitute() but with a screendump halfway. | 981 " Similar to Test_incsearch_substitute() but with a screendump halfway. |
968 func Test_incsearch_substitute_dump() | 982 func Test_incsearch_substitute_dump() |
969 CheckOption incsearch | 983 CheckOption incsearch |