aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-23 17:45:45 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-23 17:50:25 +0800
commit6cee15da7235b6ba9c428ee43346415fe6a64e6c (patch)
treec1ddf3a082b8379a25c2d862a1df8fda227c37e6 /src/nvim/testdir
parent264791925a76412ed9109028d0d694f7847249be (diff)
downloadrneovim-6cee15da7235b6ba9c428ee43346415fe6a64e6c.tar.gz
rneovim-6cee15da7235b6ba9c428ee43346415fe6a64e6c.tar.bz2
rneovim-6cee15da7235b6ba9c428ee43346415fe6a64e6c.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.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 438851a0ad..ed439ff6ec 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