diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-23 17:45:45 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-28 11:38:02 +0800 |
commit | 8e67af1b201adfca9f6c3589b4f7c59b323e9459 (patch) | |
tree | 9828c1be0315061f2522d5991258c266f6bbc01d /src/nvim/testdir | |
parent | bdbf843031b91db7ab0d4ad925c8652947d38b70 (diff) | |
download | rneovim-8e67af1b201adfca9f6c3589b4f7c59b323e9459.tar.gz rneovim-8e67af1b201adfca9f6c3589b4f7c59b323e9459.tar.bz2 rneovim-8e67af1b201adfca9f6c3589b4f7c59b323e9459.zip |
vim-patch:9.0.0061: ml_get error with nested autocommand
Problem: ml_get error with nested autocommand.
Solution: Also check line numbers for a nested autocommand. (closes vim/vim#10761)
https://github.com/vim/vim/commit/5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
Diffstat (limited to 'src/nvim/testdir')
-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 cf14c85d03..0c13331e6a 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -2170,6 +2170,25 @@ func Test_autocmd_nested() call assert_fails('au WinNew * nested nested echo bad', 'E983:') endfunc +func Test_autocmd_nested_cursor_invalid() + set laststatus=0 + copen + cclose + call setline(1, ['foo', 'bar', 'baz']) + 3 + augroup nested_inv + autocmd User foo ++nested copen + autocmd BufAdd * let &laststatus = 2 - &laststatus + augroup END + doautocmd User foo + + augroup nested_inv + au! + augroup END + set laststatus& + bwipe! +endfunc + func Test_autocmd_once() " Without ++once WinNew triggers twice let g:did_split = 0 |