summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-23 09:06:48 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-23 09:06:48 +0100
commit5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089 (patch)
treeecfbc53cfa7bd322b2506a4b11909e234063272d /src/testdir/test_autocmd.vim
parentb9e717367c395490149495cf375911b5d9de889e (diff)
patch 9.0.0061: ml_get error with nested autocommandv9.0.0061
Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index e9a59c29a6..1202c058da 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -2301,6 +2301,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