From d69a8a3fc4ad24b51817e5fd90cf2081cb981977 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 22 Oct 2020 00:30:07 -0400 Subject: 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 --- runtime/doc/vim_diff.txt | 3 +++ src/nvim/testdir/test_autocmd.vim | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index ae60c1c5e8..1fcb6611b4 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -450,6 +450,9 @@ Eval: *js_decode()* *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead. +Events: + *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead. + Highlight groups: *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim supports 'winhighlight' window-local highlights. 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 -- cgit From 49b8d43052ef2610e1fa87c484daa735a79c79ee Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 22 Oct 2020 18:26:03 -0400 Subject: vim-patch:8.2.1885: filetype tests unnessarily creates swap files Problem: Filetype tests unnessarily creates swap files. Solution: Disable 'swapfile'. (Ken Takata, closes vim/vim#7183) https://github.com/vim/vim/commit/2733779a1a36c06f5f900666ac94bfe4c25ea39b N/A patches for version.c: vim-patch:8.2.1887: Github actions not optimally configured Problem: Github actions not optimally configured. Solution: Run CI on any pushed branches. Set fail-fast. (Ozaki Kiichi, closes vim/vim#7184) https://github.com/vim/vim/commit/15ab48f088842de512ca5f13aa39a4dc7cac8477 --- src/nvim/testdir/test_filetype.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index c7ca682c8c..9f79c1b545 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -532,6 +532,7 @@ let s:filename_case_checks = { \ } func CheckItems(checks) + set noswapfile for [ft, names] in items(a:checks) for i in range(0, len(names) - 1) new @@ -548,6 +549,7 @@ func CheckItems(checks) bwipe! endfor endfor + set swapfile& endfunc func Test_filetype_detection() -- cgit