diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-04 20:54:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-04 20:54:55 +0200 |
commit | 57942237c1d54d8a236b43c56dc2b002339eb394 (patch) | |
tree | 4cd115db3d73df03da3e59493d55bd6b80a45f6c /src/testdir/test_channel.vim | |
parent | d61f2f772a59617850e9aa2f5fa069c1aad8e074 (diff) |
patch 8.2.3287: channel events not handled in BufEnter autocommandv8.2.3287
Problem: Channel events not handled in BufEnter autocommand.
Solution: Decrement dont_parse_messages earlier. (Tim Pope, closes #8697)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r-- | src/testdir/test_channel.vim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index fc82ada974..783a41d2c3 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -2330,4 +2330,33 @@ func Test_cb_with_input() unlet g:wait_exit_cb endfunc +function s:HandleBufEnter() abort + let queue = [] + let job = job_start(['date'], {'callback': { j, d -> add(queue, d) }}) + while empty(queue) + sleep! 10m + endwhile +endfunction + +func Test_parse_messages_in_autocmd() + CheckUnix + + " Check that in the BufEnter autocommand events are being handled + augroup bufenterjob + autocmd! + autocmd BufEnter Xbufenterjob call s:HandleBufEnter() + augroup END + + only + split Xbufenterjob + wincmd p + redraw + + close + augroup bufenterjob + autocmd! + augroup END +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |