Mercurial > vim
comparison src/testdir/test_syntax.vim @ 14161:7cac4646c552 v8.1.0098
patch 8.1.0098: segfault when pattern with z() is very slow
commit https://github.com/vim/vim/commit/bcf9442307075bac40d44328c8bf7ea21857b138
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 23 14:21:42 2018 +0200
patch 8.1.0098: segfault when pattern with \z() is very slow
Problem: Segfault when pattern with \z() is very slow.
Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be
able to test this. Fix that 'searchhl' resets called_emsg.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 23 Jun 2018 14:30:07 +0200 |
parents | 424321d6eea7 |
children | 1946487c74ba |
comparison
equal
deleted
inserted
replaced
14160:de4575cbbb2b | 14161:7cac4646c552 |
---|---|
560 call StopVimInTerminal(buf) | 560 call StopVimInTerminal(buf) |
561 | 561 |
562 let $COLORFGBG = '' | 562 let $COLORFGBG = '' |
563 call delete('Xtest.c') | 563 call delete('Xtest.c') |
564 endfun | 564 endfun |
565 | |
566 " Using \z() in a region with NFA failing should not crash. | |
567 func Test_syn_wrong_z_one() | |
568 new | |
569 call setline(1, ['just some text', 'with foo and bar to match with']) | |
570 syn region FooBar start="foo\z(.*\)bar" end="\z1" | |
571 call test_override("nfa_fail", 1) | |
572 redraw! | |
573 redraw! | |
574 call test_override("ALL", 0) | |
575 bwipe! | |
576 endfunc |