Add a test case for WinDisplay segfault

Fixes #2737
This commit is contained in:
Maxime Coste 2019-02-17 10:21:45 +11:00
parent 1ad3b87302
commit a61b6d7649
4 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1 @@
:e foo<ret>

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,9 @@
hook global WinDisplay .* %{ evaluate-commands %sh{
tmp=$(mktemp -d)
fifo="${tmp}/fifo"
mkfifo $fifo
printf "%s\n" "try %{ delete-buffer *test* }
edit! -fifo ${fifo} *test*
try %{ hook -always global KakEnd .* %{ nop %sh{ rm -rf ${tmp} } } }
map buffer normal '<ret>' '<a-h>;/:<c-v><c-i><ret><a-h>2<s-l><a-l>:<space>test-jump $kak_bufname<ret>'"
}}