aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-22 00:30:07 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-22 18:24:08 -0400
commitd69a8a3fc4ad24b51817e5fd90cf2081cb981977 (patch)
tree8a8afc5a3418951c270e4398c2a06fdca15fdcce /src
parentdf726408d7043c618877118909f53a78b85eb2fd (diff)
downloadrneovim-d69a8a3fc4ad24b51817e5fd90cf2081cb981977.tar.gz
rneovim-d69a8a3fc4ad24b51817e5fd90cf2081cb981977.tar.bz2
rneovim-d69a8a3fc4ad24b51817e5fd90cf2081cb981977.zip
vim-patch:8.2.0952: no simple way to interrupt Vim
Problem: No simple way to interrupt Vim. Solution: Add the SigUSR1 autocommand, triggered by SIGUSR1. (Jacob Hayes, closes vim/vim#1718) https://github.com/vim/vim/commit/be5ee8686a50acf07b823bd293f9c765e533d213
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_autocmd.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 094bb3ebd1..04a678eeb8 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -1897,4 +1897,17 @@ func Test_autocmd_FileReadCmd()
delfunc ReadFileCmd
endfunc
+" Tests for SigUSR1 autocmd event, which is only available on posix systems.
+func Test_autocmd_sigusr1()
+ CheckUnix
+
+ let g:sigusr1_passed = 0
+ au Signal SIGUSR1 let g:sigusr1_passed = 1
+ call system('/bin/kill -s usr1 ' . getpid())
+ call WaitForAssert({-> assert_true(g:sigusr1_passed)})
+
+ au! Signal
+ unlet g:sigusr1_passed
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab