aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_syntax.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_syntax.vim')
-rw-r--r--src/nvim/testdir/test_syntax.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim
index e35c0f1105..e70d9b7c66 100644
--- a/src/nvim/testdir/test_syntax.vim
+++ b/src/nvim/testdir/test_syntax.vim
@@ -482,3 +482,15 @@ fun Test_synstack_synIDtrans()
syn clear
bw!
endfunc
+
+" Using \z() in a region with NFA failing should not crash.
+func Test_syn_wrong_z_one()
+ new
+ call setline(1, ['just some text', 'with foo and bar to match with'])
+ syn region FooBar start="foo\z(.*\)bar" end="\z1"
+ " call test_override("nfa_fail", 1)
+ redraw!
+ redraw!
+ " call test_override("ALL", 0)
+ bwipe!
+endfunc