diff options
| author | lonerover <pathfinder1644@yahoo.com> | 2017-01-09 12:15:10 +0800 |
|---|---|---|
| committer | lonerover <pathfinder1644@yahoo.com> | 2017-01-09 12:23:25 +0800 |
| commit | a584375e9ffa3804077ec8cedfe8b090c1c11f7a (patch) | |
| tree | 00fa5b2438ed460d71ec4d7e4ae648db19364ac9 /src/nvim/testdir | |
| parent | f8f04350bd07bc0f3e6f618bc6c8ff4d7ce3d5ac (diff) | |
| download | rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.tar.gz rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.tar.bz2 rneovim-a584375e9ffa3804077ec8cedfe8b090c1c11f7a.zip | |
vim-patch:7.4.2314
Problem: No error when deleting an augroup while it's the current one.
Solution: Disallow deleting an augroup when it's the current one.
https://github.com/vim/vim/commit/de653f08805dde14424d417502a0480a6ad292f8
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 7d786c88cf..f05a55f1aa 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -182,13 +182,17 @@ func Test_augroup_warning() doautocmd VimEnter redir END call assert_true(match(res, "W19:") < 0) + au! VimEnter endfunc func Test_augroup_deleted() - " This caused a crash + " This caused a crash before E936 was introduced augroup x + call assert_fails('augroup! x', 'E936:') + au VimEnter * echo + augroup end augroup! x - au VimEnter * echo - au VimEnter + call assert_true(match(execute('au VimEnter'), "-Deleted-.*VimEnter") >= 0) + au! VimEnter endfunc |