diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-20 13:59:11 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-22 18:42:16 +0100 |
commit | ca853edb6f9ffe1d2e5d4a63bf88e4c3a059f5fb (patch) | |
tree | afd9e3f71abb639af2a4873950b1d3db78ad1eb5 | |
parent | b9e1289819183f94afb43330a7e0d953869e2af7 (diff) | |
download | rneovim-ca853edb6f9ffe1d2e5d4a63bf88e4c3a059f5fb.tar.gz rneovim-ca853edb6f9ffe1d2e5d4a63bf88e4c3a059f5fb.tar.bz2 rneovim-ca853edb6f9ffe1d2e5d4a63bf88e4c3a059f5fb.zip |
vim-patch:8.0.0177
Problem: When opening a buffer on a directory and inside a try/catch then
the BufEnter event is not triggered.
Solution: Return NOTDONE from readfile() for a directory and deal with the
three possible return values. (Justin M. Keyes, closes vim/vim#1375,
closes vim/vim#1353)
https://github.com/vim/vim/commit/e13b9afe1283f5ae43232b5992372a0eb570666c
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index fe9a3dd451..395c4a8596 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -196,6 +196,25 @@ func Test_augroup_deleted() au! VimEnter endfunc +func Test_BufEnter() + au! BufEnter + au Bufenter * let val = val . '+' + let g:val = '' + split NewFile + call assert_equal('+', g:val) + bwipe! + call assert_equal('++', g:val) + + " Also get BufEnter when editing a directory + call mkdir('Xdir') + split Xdir + call assert_equal('+++', g:val) + bwipe! + + call delete('Xdir', 'd') + au! BufEnter +endfunc + " Closing a window might cause an endless loop " E814 for older Vims function Test_autocmd_bufwipe_in_SessLoadPost() |