Mercurial > vim
diff src/testdir/test_autocmd.vim @ 29438:87da4bab5aaa v9.0.0061
patch 9.0.0061: ml_get error with nested autocommand
Commit: https://github.com/vim/vim/commit/5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 23 09:06:48 2022 +0100
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 https://github.com/vim/vim/issues/10761)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Jul 2022 10:15:03 +0200 |
parents | 4385dfed5b29 |
children | 9ada26920941 |
line wrap: on
line diff
--- 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